CI: Check that plmn_list matching key has dict type

The loop passes over all keys. For plmn_list, there are subentries mcc,
mnc, mnc_length. The plmn_list if block assumes that the key is a dict,
which was not checked for, leading to a type error.
This commit is contained in:
Robert Schmidt
2022-09-05 16:09:38 +02:00
parent c859c233f7
commit 46bbd3f979
+1 -1
View File
@@ -105,7 +105,7 @@ def main():
templine = line
elif re.search(r'mnc_length', line) and key["key"] == "mnc":
continue
elif re.search(r'plmn_list', line):
elif re.search(r'plmn_list', line) and type(key["env"]) is dict:
templine = re.sub(r'[0-9]+', '""', line)
templine = re.sub(r'\"\"', key["env"]["mcc"], templine, 1)
templine = re.sub(r'\"\"', key["env"]["mnc"], templine, 1)