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`
This commit is contained in:
commit
879b504b0f
1 changed files with 5 additions and 0 deletions
|
@ -753,6 +753,11 @@ class SitePlugin(object):
|
|||
|
||||
inner_path = inner_path.replace("|all", "")
|
||||
file_info = self.needFileInfo(inner_path)
|
||||
|
||||
# Use default function to download non-optional file
|
||||
if "piece_size" not in file_info:
|
||||
return super(SitePlugin, self).needFile(inner_path, *args, **kwargs)
|
||||
|
||||
file_size = file_info["size"]
|
||||
piece_size = file_info["piece_size"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue