Commit 79d9ec9a authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add support for empty FileRecorder

parent 17d8078f
......@@ -94,9 +94,12 @@ class FileRecorder(list):
@property
def summary(self):
return f"{len(self)} alleged, " \
f"{len(self) - sum(self.to_table()['existence'])} missing, " \
f"{sum(self.to_table()['existence'])} to db"
if len(self) == 0:
return '0 alleged, 0 missing, 0 to db'
else:
return f"{len(self)} alleged, " \
f"{len(self) - sum(self.to_table()['existence'])} missing, " \
f"{sum(self.to_table()['existence'])} to db"
def is_good(self):
""" Check if all alleged files exist. """
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment