summaryrefslogtreecommitdiff
path: root/subplot/data.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-12 10:34:02 +0000
committerLars Wirzenius <liw@liw.fi>2021-03-12 10:34:02 +0000
commit5c84041a89334f5bc18b895e15c8d2d93c669241 (patch)
treefdc9a7ebf3c689ec4377f4dc237dbea8a46a3355 /subplot/data.py
parent77e293e36d741a7f6e318672061d522d9dc35f6b (diff)
parent989b50a633ad285b86c3549ea9ac6f62c0a13273 (diff)
downloadobnam2-5c84041a89334f5bc18b895e15c8d2d93c669241.tar.gz
Merge branch 'badlive' into 'main'
handle files, dirs with problematic permissions Closes #82 See merge request larswirzenius/obnam!115
Diffstat (limited to 'subplot/data.py')
-rw-r--r--subplot/data.py6
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