summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lbup/repository.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lbup/repository.py b/lbup/repository.py
index 398c912..6b7c54b 100644
--- a/lbup/repository.py
+++ b/lbup/repository.py
@@ -136,4 +136,8 @@ class Repo:
def read_stats(self, tgt_name):
filename = os.path.join(self.data_dir, tgt_name, self.sizestat_name)
- return BackupStats(filename)
+ try:
+ return BackupStats(filename)
+ except statistics.StatisticsError:
+ self._logger.warning('Could not read statistics file: %s', filename)
+ return None