review of modified main.py and sshconnection.py

This commit is contained in:
Gabriele Perrone
2020-01-13 15:12:33 +01:00
parent 8f476a9904
commit ba9786dfea
4 changed files with 175 additions and 100 deletions
+10
View File
@@ -1,8 +1,16 @@
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
import pexpect # pexpect
import logging
#-----------------------------------------------------------
# Class Declaration
#-----------------------------------------------------------
class SSHConnection():
def __init__(self):
self.ssh = ''
def open(self, ipaddress, username, password):
count = 0
connect_status = False
@@ -165,3 +173,5 @@ class SSHConnection():
else:
sys.exit('SCP failed')
def getBefore(self):
return str(self.ssh.before)