mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 21:42:21 +03:00
Bug fixing in file transfer. If ahenk's folder in remote machine has not been created yet , create new folder for ahenk. There were no path for mkdir method.
This commit is contained in:
parent
b03c1f3b8c
commit
a94d5ed598
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue