[Python-checkins] cpython: Fix misunderstanding of how booleans work
eric.araujo
python-checkins at python.org
Thu Jun 9 14:10:57 CEST 2011
http://hg.python.org/cpython/rev/164158e8207e
changeset: 70720:164158e8207e
user: Éric Araujo <merwok at netwok.org>
date: Wed Jun 08 04:31:18 2011 +0200
summary:
Fix misunderstanding of how booleans work
files:
Lib/packaging/pypi/simple.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/packaging/pypi/simple.py b/Lib/packaging/pypi/simple.py
--- a/Lib/packaging/pypi/simple.py
+++ b/Lib/packaging/pypi/simple.py
@@ -231,7 +231,8 @@
"""
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"):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list