Browse code

_download: Exception != OSError

Cut-and-paste context error. Here we specifically want OSError to
dereference e.errno. If we get a different type of error, we should
raise that separately until we know how to deal with it.

I did see one example of an S3Error getting raised here, syncing down
a bucket that has versioning enabled but one file deleted. We have to
first fix this error to debug the next error.

Matt Domsch authored on 2014/02/14 22:22:51
Showing 1 changed files
... ...
@@ -930,7 +930,7 @@ def cmd_sync_remote2local(args):
930 930
                         # download completed, rename the file to destination
931 931
                         os.rename(chkptfname, dst_file)
932 932
                         debug(u"renamed chkptfname=%s to dst_file=%s" % (unicodise(chkptfname), unicodise(dst_file)))
933
-                except Exception, e:
933
+                except OSError, e:
934 934
                     if e.errno == errno.EISDIR:
935 935
                         warning(u"%s is a directory - skipping over" % dst_file)
936 936
                         continue