コード例 #1
0
 def sshConnTesting(self):
     ex = ''
     try:
         sshc = SSHClient()
         sshc.SSHconnector()
         self.__sshCli = sshc.getSSH()
     except Exception as e:
         ex = str(e)
     else:
         pass
     finally:
         return ex
コード例 #2
0
 def dbConnTesting(self):
     ex = ''
     try:
         subprocess.check_call(self.__conn2RemoteDb, shell=True)
         subprocess.check_call(self.__conn2OurDb2, shell=True)
         sshc = SSHClient()
         sshc.SSHconnector()
         self.__sshCli = sshc.getSSH()
     except Exception as e:
         ex = str(e)
     else:
         pass
     finally:
         return ex