commit | 2ef747cb778a45ec7eb96f5ba5f725bbf53e970c | [log] [tgz] |
---|---|---|
author | Éric Araujo <merwok@netwok.org> | Sat Jun 04 22:33:16 2011 +0200 |
committer | Éric Araujo <merwok@netwok.org> | Sat Jun 04 22:33:16 2011 +0200 |
tree | b0694504eee386e465bf832cb64fc13755a853d5 | |
parent | 35a4d01a927a9ad0a774eec6a9ee1b728279c5b6 [diff] [blame] |
Cleanup in packaging: don’t unnecessarily instantiate exceptions
diff --git a/Lib/packaging/pypi/dist.py b/Lib/packaging/pypi/dist.py index 16510df..db04cda 100644 --- a/Lib/packaging/pypi/dist.py +++ b/Lib/packaging/pypi/dist.py
@@ -135,7 +135,7 @@ not return one existing distribution. """ if len(self.dists) == 0: - raise LookupError() + raise LookupError if dist_type: return self[dist_type] if prefer_source: