Dulwich.io dulwich / 29fc0ac
Avoid using PermissionError, which is Python3 only. Jelmer Vernooń≥ 2 months ago
2 changed file(s) with 11 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 0.19.13 UNRELEASED
1
2 BUG FIXES
3
4 * Avoid ``PermissionError``, since it is Python3-specific.
5 (Jelmer Vernooń≥)
6
07 0.19.12 2019-08-13
18
29 BUG FIXES
995995 st1 = os.lstat(fname)
996996 try:
997997 os.chmod(fname, st1.st_mode ^ stat.S_IXUSR)
998 except PermissionError:
999 return False
998 except EnvironmentError as e:
999 if e.errno == errno.EPERM:
1000 return False
1001 raise
10001002 st2 = os.lstat(fname)
10011003
10021004 os.unlink(fname)