Dulwich.io dulwich / fc00072
Don't trust modes if they can't be modified after a file has been created. Fixes: #719 Jelmer Vernooij 24 days ago
2 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1616
1717 * Implement ``RefsContainer.__iter__``
1818 (Jelmer Vernooij, #717)
19
20 * Don't trust modes if they can't be modified after a file has been created.
21 (Jelmer Vernooij, #719)
1922
2023 0.19.11 2019-02-07
2124
993993 f.write('')
994994
995995 st1 = os.lstat(fname)
996 os.chmod(fname, st1.st_mode ^ stat.S_IXUSR)
996 try:
997 os.chmod(fname, st1.st_mode ^ stat.S_IXUSR)
998 except PermissionError:
999 return False
9971000 st2 = os.lstat(fname)
9981001
9991002 os.unlink(fname)