Simplify _check_skip_installed
@@ -401,7 +401,8 @@ class RequirementSet(object):
"""
# Check whether to upgrade/reinstall this req or not.
req_to_install.check_if_exists()
- if req_to_install.satisfied_by:
+ if not req_to_install.satisfied_by:
+ return None
upgrade_allowed = self._is_upgrade_allowed(req_to_install)
# Is the best version is installed.
@@ -442,8 +443,6 @@ class RequirementSet(object):
skip_reason = 'already satisfied'
return skip_reason
- else:
- return None
def _prepare_file(self,
finder,
