Skip to content

Commit

Permalink
common: return default value for __get_remote_revision
Browse files Browse the repository at this point in the history
When we call __get_remote_revision, we should return None if the key
is not found instead of raising an exception.

Signed-off-by: Julien Masson <[email protected]>
  • Loading branch information
massonju committed Sep 17, 2024
1 parent 404c3a6 commit 98b8277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repo_resource/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def __get_remote_url(self, remote):
return self.__remote_url[remote]

def __get_remote_revision(self, remote):
return self.__remote_revision[remote]
return self.__remote_revision.get(remote)

def set_rewrite(self, matrix: dict = None):
if matrix is None:
Expand Down

0 comments on commit 98b8277

Please sign in to comment.