Skip to content

Commit

Permalink
Merge 87c26b8 into 97c3334
Browse files Browse the repository at this point in the history
  • Loading branch information
SongYunSeop committed Sep 18, 2017
2 parents 97c3334 + 87c26b8 commit 87854c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zappa/core.py
Expand Up @@ -740,7 +740,7 @@ def get_cached_manylinux_wheel(self, package_name, package_version, disable_prog
wheel_file = '{0!s}-{1!s}-{2!s}'.format(package_name, package_version, self.manylinux_wheel_file_suffix)
wheel_path = os.path.join(cached_wheels_dir, wheel_file)

if not os.path.exists(wheel_path):
if not os.path.exists(wheel_path) or not zipfile.is_zipfile(wheel_path):
# The file is not cached, download it.
wheel_url = self.get_manylinux_wheel_url(package_name, package_version)
if not wheel_url:
Expand All @@ -749,6 +749,9 @@ def get_cached_manylinux_wheel(self, package_name, package_version, disable_prog
print(" - {}=={}: Downloading".format(package_name, package_version))
with open(wheel_path, 'wb') as f:
self.download_url_with_progress(wheel_url, f, disable_progress)

if not zipfile.is_zipfile(wheel_path):
return None
else:
print(" - {}=={}: Using locally cached manylinux wheel".format(package_name, package_version))

Expand Down

0 comments on commit 87854c2

Please sign in to comment.