aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-09-28 18:05:36 -0700
committerBryan Newbold <bnewbold@archive.org>2022-09-28 18:05:36 -0700
commitca5d6ac9145f962aa4d52b1ab060f918415b3a57 (patch)
tree8ddf9b167494358a2c438d1ebcb46254ffb86e25
parentdfd4605d84712eccb95a63e50b0bcb343642b433 (diff)
downloadsandcrawler-ca5d6ac9145f962aa4d52b1ab060f918415b3a57.tar.gz
sandcrawler-ca5d6ac9145f962aa4d52b1ab060f918415b3a57.zip
filesets: handle unknown file sizes (mypy lint fix)
-rw-r--r--python/sandcrawler/fileset_platforms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/sandcrawler/fileset_platforms.py b/python/sandcrawler/fileset_platforms.py
index a208dc4..5c13318 100644
--- a/python/sandcrawler/fileset_platforms.py
+++ b/python/sandcrawler/fileset_platforms.py
@@ -43,7 +43,7 @@ class FilesetPlatformHelper:
def chose_strategy(self, item: FilesetPlatformItem) -> IngestStrategy:
assert item.manifest
- total_size = sum([m.size for m in item.manifest]) or 0
+ total_size = sum([m.size or 0 for m in item.manifest]) or 0
largest_size = max([m.size or 0 for m in item.manifest]) or 0
if len(item.manifest) == 1:
if total_size < 64 * 1024 * 1024: