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:
@ -166,8 +166,7 @@ def parse(
|
|||||||
# Try parsing as an old-style NeXTSTEP Plist format
|
# Try parsing as an old-style NeXTSTEP Plist format
|
||||||
# pbPlist library only works on file paths, not strings :(
|
# pbPlist library only works on file paths, not strings :(
|
||||||
import tempfile
|
import tempfile
|
||||||
with tempfile.NamedTemporaryFile(mode='w+') as plist_file:
|
with tempfile.NamedTemporaryFile(mode='w+b') as plist_file:
|
||||||
data = data.decode()
|
|
||||||
plist_file.write(data)
|
plist_file.write(data)
|
||||||
plist_file.seek(0)
|
plist_file.seek(0)
|
||||||
parsed_plist = PBPlist(plist_file.name)
|
parsed_plist = PBPlist(plist_file.name)
|
||||||
|
Reference in New Issue
Block a user