Skip to content

Commit

Permalink
return if there's error in init. do not set the library ready
Browse files Browse the repository at this point in the history
  • Loading branch information
eliska-n committed Dec 17, 2024
1 parent 6366f99 commit 03ed7cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions asab/library/providers/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def init_task():
)
else:
L.exception("Error when initializing git repository: {}".format(pygit_message))
return

except pygit2.GitError as err:
pygit_message = str(err).replace('\"', '')
Expand Down Expand Up @@ -171,9 +172,11 @@ def init_task():
)
else:
L.exception("Git repository not initialized: {}".format(err))
return

except Exception as err:
L.exception(err)
return

assert hasattr(self.GitRepository, "remotes"), "Git repository not initialized."
assert self.GitRepository.remotes["origin"] is not None, "Git repository not initialized."
Expand Down

0 comments on commit 03ed7cd

Please sign in to comment.