Commit c0b64234 authored by Yusei Tahara's avatar Yusei Tahara Upload index only if http status code is 2xx.

parent da782167
......@@ -216,7 +216,8 @@ class AllowHostsPackageIndex(setuptools.package_index.PackageIndex):
if nc.get('upload-cache-url') \
and nc.get('upload-dir-url') \
and '==' in requirement \
and getattr(f, 'code', None) != 404:
and str(getattr(f, 'code', None)).startswith('2'):
# http status code is 2xx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment