Consider success flag instead of absence of exception
@@ -860,8 +860,10 @@ class InstallRequirement(object):
except Exception:
self.install_succeeded = True
raise
- else:
- if self.legacy_install_reason == 8368:
+
+ self.install_succeeded = success
+
+ if success and self.legacy_install_reason == 8368:
deprecated(
reason=(
"{} was installed using the legacy 'setup.py install' "
@@ -873,8 +875,6 @@ class InstallRequirement(object):
issue=8368,
)
- self.install_succeeded = success
-
def check_invalid_constraint_type(req):
# type: (InstallRequirement) -> str
