Browse Source

backup: revert to catching fewer exceptions

We specifically don't want to catch BrokenPipeError; just list
file-related ones that we might expect to see if we hit bad
permissions, disk errors, or race conditions.
master
Jim Paris 7 months ago
parent
commit
979dfd892f
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      backup.py

+ 4
- 1
backup.py View File

@@ -219,7 +219,10 @@ class Backup:
for entry in it:
self.scan(path=entry.path, parent_st=st)

except OSError as e:
except (FileNotFoundError,
IsADirectoryError,
NotADirectoryError,
PermissionError) as e:
self.log('E', f"can't read {pstr(path)}: {str(e)}")
return



Loading…
Cancel
Save