Skip to content

Commit

Permalink
Merge pull request #504 from TeskaLabs/feature/git-provider-error-msg
Browse files Browse the repository at this point in the history
Git provider: Make periodic pull error descriptive
  • Loading branch information
mejroslav authored Sep 26, 2023
2 parents 26093ad + af9bc8a commit 5851fb3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions asab/library/providers/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ async def _periodic_pull(self, event_name):
# Once reset of the head is finished, PubSub message about the change in the subscribed directory gets published.
for path in to_publish:
self.App.PubSub.publish("Library.change!", self, path)
except pygit2.GitError:
L.warning("Periodic pull from the remote repository failed.")
except pygit2.GitError as err:
L.warning(
"Periodic pull from the remote repository failed: {}".format(err),
struct_data={"url": self.URLPath}
)
finally:
self.PullLock = False

Expand Down

0 comments on commit 5851fb3

Please sign in to comment.