mirror of
https://github.com/mewtek/i2ME-Legacy.git
synced 2025-05-11 17:00:23 -05:00
getZones function for MachineProductCfg.py
This commit is contained in:
parent
f7314f286f
commit
fd1b69c49b
@ -35,5 +35,17 @@ def getAirportCodes():
|
||||
|
||||
return airports
|
||||
|
||||
def getZones():
|
||||
""" Returns a list of zones present in the MachineProductCfg """
|
||||
zones = []
|
||||
for i in data['Config']['ConfigDef']['ConfigItems']['ConfigItem']:
|
||||
if i['@key'] == "primaryZone" and i['@value'] != "":
|
||||
zones.append(i['@value']) # This should only be one value
|
||||
|
||||
print(getPrimaryLocations())
|
||||
if i['@key'] == "secondaryZones" and i['@value'] != "":
|
||||
for x in i['@value'].split(','):
|
||||
zones.append(x)
|
||||
|
||||
return zones
|
||||
|
||||
print(getZones())
|
Loading…
x
Reference in New Issue
Block a user