From 7471ede36d27a8e211a0af9c2027318c3728dccb Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Sun, 8 Mar 2015 16:35:25 +0100 Subject: [PATCH] no need to recheck what we have just inserted --- pip/index.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pip/index.py b/pip/index.py index cd61593b1..9ba6982fa 100644 --- a/pip/index.py +++ b/pip/index.py @@ -448,12 +448,11 @@ class PackageFinder(object): INSTALLED_VERSION, ) ) + existing_applicable = True + else: + existing_applicable = False applicable_versions = self._sort_versions(applicable_versions) - existing_applicable = any( - i.location is INSTALLED_VERSION - for i in applicable_versions - ) if not upgrade and existing_applicable: if applicable_versions[0].location is INSTALLED_VERSION: