diff mbox series

[yocto-autobuilder-helper,3/8] scripts/send-qa-email: invert boolean logic for release check

Message ID 20230313145145.2574842-4-alexis.lothore@bootlin.com
State New
Headers show
Series fix regression reports generation on "master-next" branches | expand

Commit Message

Alexis Lothoré March 13, 2023, 2:51 p.m. UTC
From: Alexis Lothoré <alexis.lothore@bootlin.com>

is_non_release_version has an inverted logic which makes its reuse quite

Transform it as is_release_version and let caller do the negation if needed

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
 scripts/send_qa_email.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series


diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index 96225a8..320ff24 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -14,15 +14,15 @@  import re
 import utils
-def is_non_release_version(version):
+def is_release_version(version):
     p = re.compile('\d{8}-\d+')
-    return p.match(version) is not None
+    return p.match(version) is None
 def get_previous_tag(targetrepodir, version):
     previousversion = None
     previousmilestone = None
     if version:
-        if is_non_release_version(version):
+        if not is_release_version(version):
             return subprocess.check_output(["git", "describe", "--abbrev=0"], cwd=targetrepodir).decode('utf-8').strip()
         compareversion, comparemilestone, _ = utils.get_version_from_string(version)
         compareversionminor = compareversion[-1]