Skip to content

Commit

Permalink
Neaten
Browse files Browse the repository at this point in the history
  • Loading branch information
frankharkins committed Aug 3, 2023
1 parent 26b3707 commit ee67b71
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ecosystem/daos/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,11 @@ def delete(self, repo_url: str):
def get_by_url(self, url: str) -> Repository:
"""
Returns repository by URL.
Args:
repo_url: repository url
"""
try:
return self.storage.read()[url]
except KeyError as err:
raise KeyError(f"No repo with URL '{url}'") from err
data = self.storage.read()
if url not in data:
raise KeyError(f"No repo with URL '{url}'")
return self.storage.read()[url]

def update(self, repo_url: str, **kwargs):
"""
Expand Down

0 comments on commit ee67b71

Please sign in to comment.