Instead of erroring out with an exception, make --restore emit an
error message indicating that something is wrong with the index.
index_it = self.iterate_index_path(index1)
except tarfile.DecryptionError as exn:
self.logger.error("failed to decrypt file [%s]: %s; is this an "
- "actual index file?"
- % (str(exn), index1))
+ "actual encrypted index file?"
+ % (index1, str (exn)))
+ return [(index1, exn)]
+ except Exception as exn:
+ # compressed files
+ self.logger.error("failed to read file [%s]: %s; is this an "
+ "actual index file?" % (index1, str (exn)))
return [(index1, exn)]
dir_it = self._recursive_walk_dir('.')