aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools/package_index.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 8f8bf6ed..a6918123 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -605,14 +605,15 @@ class PackageIndex(Environment):
mylocation = self.download(dist.location, tmpdir)
if os.path.exists(mylocation):
return dist, mylocation
+ return None, None
if force_scan:
self.prescan()
self.find_packages(requirement)
dist, mylocation = find(requirement)
- if local_index is not None:
- dist, mylocation = dist, mylocation if dist else find(requirement, local_index)
+ if not dist and local_index is not None:
+ dist, mylocation = find(requirement, local_index)
if dist is None:
if self.to_scan is not None: