1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 08:16:54 +00:00

Merge pull request #6218 from ThomasWaldmann/better-errors-master

if ensure_dir() fails, give more informative error message, fixes #5952
This commit is contained in:
TW 2022-02-01 04:25:15 +01:00 committed by GitHub
commit 2b81943030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ def ensure_dir(path, mode=stat.S_IRWXU, pretty_deadly=True):
os.makedirs(path, mode=mode, exist_ok=True) os.makedirs(path, mode=mode, exist_ok=True)
except OSError as e: except OSError as e:
if pretty_deadly: if pretty_deadly:
raise Error(e.args[1]) raise Error(str(e))
else: else:
raise raise