From: Desnes Nunes <[email protected]>

redhat/configs: Make merge.py portable for older python

Since the operand := was only introduced on python-38, the merge.py script
breaks when `make rh-configs` is run on systems with older python versions

Signed-off-by: Desnes Nunes <[email protected]>

diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py
index blahblah..blahblah 100755
--- a/redhat/configs/merge.py
+++ b/redhat/configs/merge.py
@@ -32,10 +32,14 @@ notset = re.compile(r'^#\s+(CONFIG_\w+)\s+is not set')
 # if we get a match return the config that is being changed
 def find_config(line):
     '''find a configuration line in the input and return the config name'''
-    if m := isset.match(line):
+    m = isset.match(line)
+    if (m is not None):
         return m.group(1)
-    if m := notset.match(line):
+
+    m = notset.match(line)
+    if (m is not None):
         return m.group(1)
+
     return None
 
 #########################################################

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2285
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to