Browse code

better warning for ETXTBSY

Print a better warning when downloading a file where the overwriting
the destination raises os.ETXTBSY (text file is open for execute
already), and continue.

Matt Domsch authored on 2015/01/10 02:36:00
Showing 1 changed files
... ...
@@ -1045,6 +1045,10 @@ def cmd_sync_remote2local(args):
1045 1045
                     if e.errno == errno.EISDIR:
1046 1046
                         warning(u"%s is a directory - skipping over" % unicodise(dst_file))
1047 1047
                         continue
1048
+                    elif e.errno == errno.ETXTBSY:
1049
+                        warning(u"%s is currently open for execute, cannot be overwritten.  Skipping over." % unicodise(dst_file))
1050
+                        os.unlink(chkptfname)
1051
+                        continue
1048 1052
                     else:
1049 1053
                         raise
1050 1054
                 except S3DownloadError, e: