This commit is contained in:
Volkan Şahin 2016-07-13 17:30:36 +03:00
commit 74c54fd0f1

View file

@ -40,7 +40,8 @@ class Ssh(object):
try: try:
sftp.chdir(self.target_path) # Test if remote_path exists sftp.chdir(self.target_path) # Test if remote_path exists
except IOError: except IOError:
sftp.mkdir() # Create remote_path print(self.target_path)
sftp.mkdir(self.target_path) # Create remote_path
sftp.chdir(self.target_path) sftp.chdir(self.target_path)
sftp.put(local_path, self.target_path + md5) sftp.put(local_path, self.target_path + md5)