From a94d5ed5983c6ae07bb64c07ae376844866f8f90 Mon Sep 17 00:00:00 2001 From: cemrealpsoy Date: Wed, 13 Jul 2016 15:56:42 +0300 Subject: [PATCH] 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. --- opt/ahenk/base/file/ssh_file_transfer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opt/ahenk/base/file/ssh_file_transfer.py b/opt/ahenk/base/file/ssh_file_transfer.py index 5a34146..3b05582 100644 --- a/opt/ahenk/base/file/ssh_file_transfer.py +++ b/opt/ahenk/base/file/ssh_file_transfer.py @@ -40,7 +40,8 @@ class Ssh(object): try: sftp.chdir(self.target_path) # Test if remote_path exists 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.put(local_path, self.target_path + md5)