From 98b8277e508800aed95735dd5bf2139257554a59 Mon Sep 17 00:00:00 2001 From: Julien Masson Date: Tue, 17 Sep 2024 10:29:55 +0200 Subject: [PATCH] common: return default value for __get_remote_revision 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 --- repo_resource/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo_resource/common.py b/repo_resource/common.py index 6bea21c..bf895e1 100644 --- a/repo_resource/common.py +++ b/repo_resource/common.py @@ -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: