1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

try writing to file as bytes for windows compatibility

This commit is contained in:
Kelly Brazil
2022-12-30 10:44:46 -08:00
parent 5e32a6d828
commit e49c621e59

View File

@ -166,8 +166,7 @@ def parse(
# Try parsing as an old-style NeXTSTEP Plist format
# pbPlist library only works on file paths, not strings :(
import tempfile
with tempfile.NamedTemporaryFile(mode='w+') as plist_file:
data = data.decode()
with tempfile.NamedTemporaryFile(mode='w+b') as plist_file:
plist_file.write(data)
plist_file.seek(0)
parsed_plist = PBPlist(plist_file.name)