]> granicus.if.org Git - python/commitdiff
Fix misunderstanding of how booleans work
authorÉric Araujo <merwok@netwok.org>
Wed, 8 Jun 2011 02:31:18 +0000 (04:31 +0200)
committerÉric Araujo <merwok@netwok.org>
Wed, 8 Jun 2011 02:31:18 +0000 (04:31 +0200)
Lib/packaging/pypi/simple.py

index c372c6fe3ef7e305c4cff2a68d335b24e9e7aa42..777fa93b57dbe36fea5bf66c98b7d8c95a7aecb7 100644 (file)
@@ -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"):