From: Desnes Nunes <desnesn(a)redhat.com>
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 <desnesn(a)redhat.com>
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