Skip to content

Commit b549182

Browse files
committed
Fixes #967 - In addition with patch for #960, ensure that error logging with not crash
As in python3 errno can be "None" with system raised exceptions, ensure that this case will not make s3cmd crash just for an error log output.
1 parent b790be5 commit b549182

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

s3cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ def cmd_sync_remote2local(args):
13491349
error(u"Download of '%s' failed (Reason: No space left)" % file)
13501350
allow_partial = False
13511351
else:
1352-
error(u"Download of '%s' failed (Reason: Unknown OsError %d)" % (file, exc.errno))
1352+
error(u"Download of '%s' failed (Reason: Unknown OsError %d)" % (file, exc.errno or 0))
13531353
allow_partial = False
13541354

13551355
try:

0 commit comments

Comments
 (0)