summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-08 02:31:18 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-08 02:31:18 (GMT)
commitea888e038b7c5da136ef90191c16cf5ac6de4b14 (patch)
tree51bf09a264bba2b671ed6f9e84a8a0b6ed58d844 /Lib/packaging
parent3cab2f150c5ab8af6cedbe9ce5550d97e4a4004a (diff)
downloadcpython-ea888e038b7c5da136ef90191c16cf5ac6de4b14.zip
cpython-ea888e038b7c5da136ef90191c16cf5ac6de4b14.tar.gz
cpython-ea888e038b7c5da136ef90191c16cf5ac6de4b14.tar.bz2
Fix misunderstanding of how booleans work
Diffstat (limited to 'Lib/packaging')
-rw-r--r--Lib/packaging/pypi/simple.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/packaging/pypi/simple.py b/Lib/packaging/pypi/simple.py
index c372c6f..777fa93 100644
--- a/Lib/packaging/pypi/simple.py
+++ b/Lib/packaging/pypi/simple.py
@@ -231,7 +231,8 @@ class Crawler(BaseClient):
"""
self._mirrors_used.add(self.index_url)
index_url = self._mirrors.pop()
- if not ("http://" or "https://" or "file://") in index_url:
+ # XXX use urllib.parse for a real check of missing scheme part
+ if not index_url.startswith(("http://", "https://", "file://")):
index_url = "http://%s" % index_url
if not index_url.endswith("/simple"):