From 9ac4a31e19175bc64680ff7dd1a41037d00a7852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek?= Date: Tue, 9 Aug 2022 19:31:58 +0200 Subject: [PATCH] detector: use [] instead of false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Valíček --- repo_cloner/lib/detector.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repo_cloner/lib/detector.py b/repo_cloner/lib/detector.py index 034329e..8398e95 100644 --- a/repo_cloner/lib/detector.py +++ b/repo_cloner/lib/detector.py @@ -173,7 +173,11 @@ class Detector: def run(self, callback: Callable[[DetectedCommit], None]) -> int: log.info(f"Running commit detector") new_branches = self._repo.list_branches() + if not new_branches: + new_branches = [] new_tags = self._repo.list_tags() + if not new_tags: + new_tags = [] # remove removed old_keys = self._branches.keys()