Skip to content

Commit

Permalink
fail more gracefully when no /opt/ampm/repo_uri file
Browse files Browse the repository at this point in the history
  • Loading branch information
Wazzaps committed Mar 26, 2022
1 parent 624ee2b commit aaae8ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ampm/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
ARTIFACT_TYPES = ['file', 'dir', 'tar.gz', 'gz']

LOCAL_REPO_URI = 'file:///var/ampm'
REMOTE_REPO_URI = Path('/opt/ampm/repo_uri').read_text().strip()
try:
REMOTE_REPO_URI = Path('/opt/ampm/repo_uri').read_text().strip()
except FileNotFoundError:
REMOTE_REPO_URI = ''


def hash_buffer(buffer) -> str:
Expand Down

0 comments on commit aaae8ae

Please sign in to comment.