diff options
author | Éric Araujo <merwok@netwok.org> | 2011-06-09 14:07:46 +0200 |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-06-09 14:07:46 +0200 |
commit | e00a6703e8d13ae4ab30466998ef62098868f98c (patch) | |
tree | a4d6fcb7fe4b323727b491c7a7b042fc0f14a657 /Lib/packaging/pypi/simple.py | |
parent | 9a82eaade3cbfba9895b6121daf8ddb65b5aaa4d (diff) | |
parent | e6792c1e771fab4ed025beeb8f71fb2d5c7d53e8 (diff) | |
download | cpython-git-e00a6703e8d13ae4ab30466998ef62098868f98c.tar.gz |
Branch merge
Diffstat (limited to 'Lib/packaging/pypi/simple.py')
-rw-r--r-- | Lib/packaging/pypi/simple.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/packaging/pypi/simple.py b/Lib/packaging/pypi/simple.py index c372c6fe3e..1dcb8ce43a 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"): @@ -282,7 +283,7 @@ class Crawler(BaseClient): name = release.name else: name = release_info['name'] - if not name.lower() in self._projects: + if name.lower() not in self._projects: self._projects[name.lower()] = ReleasesList(name, index=self._index) if release: @@ -320,7 +321,7 @@ class Crawler(BaseClient): # it's a distribution, so create a dist object try: infos = get_infos_from_url(link, project_name, - is_external=not self.index_url in url) + is_external=self.index_url not in url) except CantParseArchiveName as e: if self.verbose: logger.warning( |