Tidy up exception block
@@ -843,11 +843,10 @@ class InstallRequirement(object):
unpacked_source_directory=self.unpacked_source_directory,
req_description=str(self.req),
)
- except Exception as exc:
- if isinstance(exc, LegacyInstallFailure):
+ except LegacyInstallFailure as exc:
self.install_succeeded = False
six.reraise(*exc.parent)
- else:
+ except Exception:
self.install_succeeded = True
raise
