-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
Description
It will have the src filename in the error msg, even if the dst file / hash file raised the exception:
try:
with self.path_helper.abs_src_filepath.open("rb") as in_file:
with self.path_helper.abs_dst_hash_filepath.open("w") as hash_file:
with self.path_helper.abs_dst_filepath.open("wb") as out_file:
hash = self._deduplication_backup(self.dir_path, in_file, out_file, process_bar)
hash_hexdigest = hash.hexdigest()
hash_file.write(hash_hexdigest)
except OSError as err:
# FIXME: Better error message
raise BackupFileError(
"Skip file %s error: %s" % (self.path_helper.abs_src_filepath, err))
Also, you maybe will want to log-and-continue on src file exceptions.
But you must not log-and-continue on dst file exceptions, they must be fatal.