##// END OF EJS Templates
py3: catch PermissionError instead of checking errno == EPERM
Manuel Jacob -
r50203:d2adebe3 default
parent child Browse files
Show More
@@ -2503,12 +2503,10 b' class filestat:'
2503 2503 advanced = (old.stat[stat.ST_MTIME] + 1) & 0x7FFFFFFF
2504 2504 try:
2505 2505 os.utime(path, (advanced, advanced))
2506 except OSError as inst:
2507 if inst.errno == errno.EPERM:
2506 except PermissionError:
2508 2507 # utime() on the file created by another user causes EPERM,
2509 2508 # if a process doesn't have appropriate privileges
2510 2509 return False
2511 raise
2512 2510 return True
2513 2511
2514 2512 def __ne__(self, other):
General Comments 0
You need to be logged in to leave comments. Login now