mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
utils: makedirs: ignore chmod errors (#5570)
Same as with `protect()`, these errors might happen if fs is immutable or doesn't support chmod()-ing. We can safely ignore these. Fixes #5552
This commit is contained in:
+4
-1
@@ -180,7 +180,10 @@ def makedirs(path, exist_ok=False, mode=None):
|
||||
if not exist_ok or not os.path.isdir(path):
|
||||
raise
|
||||
|
||||
os.chmod(path, mode)
|
||||
try:
|
||||
os.chmod(path, mode)
|
||||
except OSError:
|
||||
logger.trace("failed to chmod '%o' '%s'", mode, path, exc_info=True)
|
||||
|
||||
|
||||
def copyfile(src, dest, no_progress_bar=False, name=None):
|
||||
|
||||
Reference in New Issue
Block a user