diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-12 11:12:46 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-12 12:00:00 +0200 |
commit | 0fcb8f314a054e4c92e49461f1ae2d9392756638 (patch) | |
tree | 9d1690d3e4b23217a65412342de160c2dac49d48 /subplot/data.py | |
parent | 77e293e36d741a7f6e318672061d522d9dc35f6b (diff) | |
download | obnam2-0fcb8f314a054e4c92e49461f1ae2d9392756638.tar.gz |
feat: show warnings for any problems backing up files
Previously, we either ignored it or aborted the backup. Neither is
good. Now we ignore the problem, except to show a warning at the end
of the backup run.
Diffstat (limited to 'subplot/data.py')
-rw-r--r-- | subplot/data.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subplot/data.py b/subplot/data.py index 9396215..1455bf4 100644 --- a/subplot/data.py +++ b/subplot/data.py @@ -73,7 +73,11 @@ def file_is_restored(ctx, filename=None, restored=None): def file_is_not_restored(ctx, filename=None, restored=None): filename = os.path.join(restored, "./" + filename) - exists = os.path.exists(filename) + logging.info(r"verifying that {filename} does not exist") + try: + exists = os.path.exists(filename) + except PermissionError: + exists = False logging.debug(f"restored? {filename} {exists}") assert not exists |