Fixed platform filter. Fixes #18

This commit is contained in:
Eddy Hintze
2020-02-22 13:54:57 -05:00
parent c1e1df35fe
commit ccff521927
5 changed files with 48 additions and 2 deletions

View File

@@ -306,6 +306,9 @@ class DownloadLibrary:
space=' ' * (pb_width - done),
), end='\r')
if dl != total_length:
raise ValueError("Download did not complete")
def _load_cache_data(self, cache_file):
try:
with open(cache_file, 'r') as f:
@@ -326,7 +329,9 @@ class DownloadLibrary:
def _should_download_platform(self, platform):
platform = platform.lower()
return self.platform_include and platform not in self.platform_include
if self.platform_include and platform not in self.platform_include:
return False
return True
def _should_download_file_type(self, ext):
ext = ext.lower()