mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-13 07:18:25 +01:00
utils: remove: catch EPERM when chmoding a file
Fix https://github.com/iterative/dvc/pull/2298#issuecomment-520184196
This commit is contained in:
@@ -193,8 +193,8 @@ def _chmod(func, p, excinfo):
|
||||
try:
|
||||
os.chmod(p, perm)
|
||||
except OSError as exc:
|
||||
# broken symlink
|
||||
if exc.errno != errno.ENOENT:
|
||||
# broken symlink or file is not owned by us
|
||||
if exc.errno not in [errno.ENOENT, errno.EPERM]:
|
||||
raise
|
||||
|
||||
func(p)
|
||||
|
||||
Reference in New Issue
Block a user