Skip to content

Commit 58beec4

Browse files
Danpkittenis
authored andcommitted
Added exception on errors copying files
1 parent 233a55e commit 58beec4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pssh/ssh_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,6 @@ def copy_file(self, local_file, remote_file, recurse=False):
372372
except Exception, error:
373373
logger.error("Error occured copying file %s to remote destination %s:%s - %s",
374374
local_file, self.host, remote_file, error)
375-
else:
376-
logger.info("Copied local file %s to remote destination %s:%s",
377-
local_file, self.host, remote_file)
375+
raise error
376+
logger.info("Copied local file %s to remote destination %s:%s",
377+
local_file, self.host, remote_file)

0 commit comments

Comments
 (0)