Fix MachineProductCfg.py not opening the Xml correctly

This commit is contained in:
April 2022-10-18 17:43:54 -07:00
parent 51be3229e9
commit 874f465c61
No known key found for this signature in database
GPG Key ID: 17A9A017FAA4DE5E

View File

@ -3,7 +3,7 @@ import xmltodict
# Open the MachineProductCfg.xml file in the root directory # Open the MachineProductCfg.xml file in the root directory
with open("MachineProductCfg.xml") as MPCxml: with open("MachineProductCfg.xml", mode = 'r', encoding= 'utf-8') as MPCxml:
MPCdict = xmltodict.parse(MPCxml.read()) MPCdict = xmltodict.parse(MPCxml.read())
MPCdump = json.dumps(MPCdict) MPCdump = json.dumps(MPCdict)
data = json.loads(MPCdump) data = json.loads(MPCdump)