Skip to content

Commit

Permalink
Wrap the repo pull in an error handler (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsee authored Oct 2, 2020
1 parent 938155c commit d1650c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resource-dispatcher/repositories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def generate_ssh_command(repository):
def __wrap_repo_pull(repo, ref, env):

def pull():
repo.remotes.origin.pull(ref, env=env)
try:
repo.remotes.origin.pull(ref, env=env)
except Exception as e:
print(f"ERROR: Could not fetch the latest copy of a repository ({e})")

return pull

0 comments on commit d1650c9

Please sign in to comment.