From e49c621e59e354dbe17160ea36ee190b44400fcb Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Fri, 30 Dec 2022 10:44:46 -0800 Subject: [PATCH] try writing to file as bytes for windows compatibility --- jc/parsers/plist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jc/parsers/plist.py b/jc/parsers/plist.py index f39eb8b9..83f203aa 100644 --- a/jc/parsers/plist.py +++ b/jc/parsers/plist.py @@ -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)