Skip to content

Commit

Permalink
Merge pull request #16599 from akatrevorjay/pull-req-cloud-scp-status…
Browse files Browse the repository at this point in the history
…-code

Cloud: Check the exit status code of scp before assuming it has failed.
  • Loading branch information
thatch45 committed Oct 13, 2014
2 parents 4e81d27 + c94edde commit 25cf706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/utils/cloud.py
Expand Up @@ -1076,7 +1076,7 @@ def sftp_file(dest_path, contents, kwargs, allow_failure=False):
if not proc.isalive():
break
time.sleep(0.025)
if allow_failure is False:
if allow_failure is False and proc.exitstatus != 0:
raise SaltCloudSystemExit(
'Failed to upload {0} to {1}. Exit code: {2}'.format(
tmppath, dest_path, proc.exitstatus
Expand Down

0 comments on commit 25cf706

Please sign in to comment.