From ca5d6ac9145f962aa4d52b1ab060f918415b3a57 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 28 Sep 2022 18:05:36 -0700 Subject: filesets: handle unknown file sizes (mypy lint fix) --- python/sandcrawler/fileset_platforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') 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: -- cgit v1.2.3