macOS deploy: use the new plistlib API

See https://docs.python.org/3/library/plistlib.html.
The new API was added in 3.4 and old removed in 3.9.
This commit is contained in:
Jonas Schnelli
2020-11-04 09:59:36 +01:00
committed by Michel van Kessel
parent 3b2c73113e
commit 51cc2791a7

View File

@@ -552,7 +552,8 @@ if len(config.fancy) == 1:
sys.exit(1)
try:
fancy = plistlib.readPlist(p)
with open(p, 'rb') as fp:
fancy = plistlib.load(fp, fmt=plistlib.FMT_XML)
except:
if verbose >= 1:
sys.stderr.write("Error: Could not parse fancy disk image plist at \"%s\"\n" % (p))