This commit is contained in:
Kovid Goyal 2015-06-16 14:39:56 +05:30
parent ea033b0157
commit 1f99160b3a

View File

@ -457,7 +457,7 @@ def atomic_rename(oldpath, newpath):
try:
win32file.MoveFileEx(oldpath, newpath, win32file.MOVEFILE_REPLACE_EXISTING|win32file.MOVEFILE_WRITE_THROUGH)
break
except:
except Exception:
if i > 8:
raise
# Try the rename repeatedly in case something like a virus