From b03c1f3b8c48894b9000d55c8f0a935a3344b875 Mon Sep 17 00:00:00 2001 From: "mine.dogan" Date: Tue, 12 Jul 2016 17:29:18 +0300 Subject: [PATCH 1/2] bug fix for response data --- opt/ahenk/base/messaging/Messaging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opt/ahenk/base/messaging/Messaging.py b/opt/ahenk/base/messaging/Messaging.py index 9fc57e1..16e9d7d 100644 --- a/opt/ahenk/base/messaging/Messaging.py +++ b/opt/ahenk/base/messaging/Messaging.py @@ -35,7 +35,7 @@ class Messaging(object): data['responseCode'] = response.get_code() data['responseMessage'] = response.get_message() response_data = None - if data['responseData'] is not None: + if response.get_data() is not None: response_data = json.loads(str(response.get_data())) data['responseData'] = response_data data['contentType'] = response.get_content_type() @@ -54,7 +54,7 @@ class Messaging(object): data['responseMessage'] = response.get_message() response_data = None - if data['responseData'] is not None: + if response.get_data() is not None: response_data = json.loads(str(response.get_data())) data['responseData'] = response_data From a94d5ed5983c6ae07bb64c07ae376844866f8f90 Mon Sep 17 00:00:00 2001 From: cemrealpsoy Date: Wed, 13 Jul 2016 15:56:42 +0300 Subject: [PATCH 2/2] 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)