Cleanup in packaging: don’t unnecessarily instantiate exceptions

This commit is contained in:
Éric Araujo 2011-06-04 22:33:16 +02:00
parent 35a4d01a92
commit 2ef747cb77
4 changed files with 4 additions and 4 deletions

View file

@ -135,7 +135,7 @@ class ReleaseInfo(IndexReference):
not return one existing distribution.
"""
if len(self.dists) == 0:
raise LookupError()
raise LookupError
if dist_type:
return self[dist_type]
if prefer_source:

View file

@ -189,7 +189,7 @@ class Crawler(BaseClient):
self._process_index_page(predicate.name)
if predicate.name.lower() not in self._projects:
raise ProjectNotFound()
raise ProjectNotFound
releases = self._projects.get(predicate.name.lower())
releases.sort_releases(prefer_final=prefer_final)