Esempio n. 1
0
 def _tryServer(self):
     #Validate P4 Port
     if self.p4Port is None:
         success, port = guiUtils.getUserInput(msg='Please Enter P4 Server:')
         if not success :
             raise P4Exception('Unable to determine P4PORT')
         self.setP4Port(port)
         
     if self.p4Port == '' :
         self._tryWorkspace()
         return
     
     #Set the env's for next time
     if not os.environ.has_key('P4PORT'):
         apiUtils.setEnv('P4PORT', self.p4Port)
     
     self.p4Conn.port = self.p4Port
Esempio n. 2
0
 def _tryWorkspace(self):
     #Validate Client Workspace
     if self.p4Client is None:
         success, client = guiUtils.getUserInput(msg='Please Enter Default Workspace:')
         if not success :
             raise P4Exception('Unable to determine P4CLIENT')
         self.setP4Client(client)
         
     if self.p4Client == '' :
         self._tryWorkspace()
         return
     
     #Set the env's for next time
     if not os.environ.has_key('P4CLIENT'):
         apiUtils.setEnv('P4CLIENT', self.p4Client)
     
     self.p4Conn.client = self.p4Client
Esempio n. 3
0
    def _tryServer(self):
        #Validate P4 Port
        if self.p4Port is None:
            success, port = guiUtils.getUserInput(
                msg='Please Enter P4 Server:')
            if not success:
                raise P4Exception('Unable to determine P4PORT')
            self.setP4Port(port)

        if self.p4Port == '':
            self._tryWorkspace()
            return

        #Set the env's for next time
        if 'P4PORT' not in os.environ:
            apiUtils.setEnv('P4PORT', self.p4Port)

        self.p4Conn.port = self.p4Port
Esempio n. 4
0
    def _tryWorkspace(self):
        #Validate Client Workspace
        if self.p4Client is None:
            success, client = guiUtils.getUserInput(
                msg='Please Enter Default Workspace:')
            if not success:
                raise P4Exception('Unable to determine P4CLIENT')
            self.setP4Client(client)

        if self.p4Client == '':
            self._tryWorkspace()
            return

        #Set the env's for next time
        if 'P4CLIENT' not in os.environ:
            apiUtils.setEnv('P4CLIENT', self.p4Client)

        self.p4Conn.client = self.p4Client