Skip to content

Commit 879b504

Browse files
authored
Merge pull request #2179 from krzotr/patch-4
KeyError: 'piece_size' in `fileNeed` command in BigfilePlugin when try to download non-optional files with `|all`
2 parents 912c958 + baa5df1 commit 879b504

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

plugins/Bigfile/BigfilePlugin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,11 @@ def pooledNeedBigfile(inner_path, *args, **kwargs):
753753

754754
inner_path = inner_path.replace("|all", "")
755755
file_info = self.needFileInfo(inner_path)
756+
757+
# Use default function to download non-optional file
758+
if "piece_size" not in file_info:
759+
return super(SitePlugin, self).needFile(inner_path, *args, **kwargs)
760+
756761
file_size = file_info["size"]
757762
piece_size = file_info["piece_size"]
758763

0 commit comments

Comments
 (0)