From 9c45c0fae107f2ef64196900e654853e70cefd79 Mon Sep 17 00:00:00 2001 From: Maxime Chretien Date: Tue, 9 Jun 2020 09:13:05 +0200 Subject: [PATCH] update.py: Exit if there is no tag to add This prevent the script from locking at line 578 because UpdateIds will never send an event to wake up the threads (line 91) if there is no tag to add. Also change len(tag_buf) to num_tags in line 548, no need to compute the length again as we already have it. Signed-off-by: Maxime Chretien --- update.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index d906d31..c673f4c 100755 --- a/update.py +++ b/update.py @@ -545,7 +545,10 @@ for tag in scriptLines('list-tags'): num_tags = len(tag_buf) project = lib.currentProject() -print(project + ' - found ' + str(len(tag_buf)) + ' new tags') +print(project + ' - found ' + str(num_tags) + ' new tags') + +if not num_tags: + exit(0) threads_list.append(UpdateIds(tag_buf)) threads_list.append(UpdateVersions(tag_buf))