Skip to content

Commit

Permalink
ostree: Drop try/except and hope for the best
Browse files Browse the repository at this point in the history
  • Loading branch information
barthalion committed Sep 27, 2023
1 parent 1e2df8b commit eeb2ea0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions flatpak_builder_lint/ostree.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ def get_primary_ref(repo: str) -> Optional[str]:


def get_text_file(repo: str, ref: str, path: str) -> Optional[str]:
try:
cmd = cli(repo, "cat", ref, path)
if cmd["returncode"] == 0:
return cmd["stdout"]
except:
return None
cmd = cli(repo, "cat", ref, path)
if cmd["returncode"] == 0:
return cmd["stdout"]

return None

Expand Down

0 comments on commit eeb2ea0

Please sign in to comment.