From 7d22232c1c9bcb84bf4254460fccf3adc7262d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Tue, 17 May 2016 12:29:51 +0300 Subject: [PATCH] file transfer via ssh was fixed about exception throwing --- opt/ahenk/base/messaging/ssh_file_transfer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opt/ahenk/base/messaging/ssh_file_transfer.py b/opt/ahenk/base/messaging/ssh_file_transfer.py index 41ab570..96b8c67 100644 --- a/opt/ahenk/base/messaging/ssh_file_transfer.py +++ b/opt/ahenk/base/messaging/ssh_file_transfer.py @@ -43,9 +43,10 @@ class FileTransfer(object): self.logger.debug('[FileTransfer] File was downloaded to {} from {}'.format(local_path, remote_path)) except Exception as e: self.logger.error('[FileTransfer] A problem occurred while downloading file. Exception message: {}'.format(str(e))) + raise finally: self.connection.close() - self.logger.debug('[FileTransfer] Connection is closed successfully') + self.logger.debug('[FileTransfer] Connection is closed successfully') def connect(self): self.logger.debug('[FileTransfer] Connecting to {} via {}'.format(self.target_hostname, self.port))