From: Alexis Lothoré <alexis.loth...@bootlin.com>

is_non_release_version has an inverted logic which makes its reuse quite
confusing

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

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

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]
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#59411): https://lists.yoctoproject.org/g/yocto/message/59411
Mute This Topic: https://lists.yoctoproject.org/mt/97582164/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to