Skip to content

Commit 21e62bf

Browse files
Caid11pkittenis
authored andcommitted
Removed unnecessary variable from raised exception; updated error message
1 parent b96f97f commit 21e62bf

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
@@ -407,15 +407,15 @@ def copy_file_to_local(self, remote_file, local_file, recurse=False):
407407
if remote_dir_exists and recurse:
408408
return self._copy_dir_to_local(remote_file, local_file)
409409
elif remote_dir_exists and not recurse:
410-
raise ValueError("Recurse must be true if local_file is a "
410+
raise ValueError("Recurse must be true if remote_file is a "
411411
"directory.")
412412
destination = self._parent_path_split(local_file)
413413
if not os.path.exists(destination):
414414
try:
415415
os.makedirs(destination)
416-
except OSError, exception:
416+
except OSError:
417417
logger.error("Unable to create local directory structure.")
418-
raise exception
418+
raise
419419
try:
420420
sftp.get(remote_file, local_file)
421421
except Exception, error:

0 commit comments

Comments
 (0)