From 620061df63e1795a3467da6520b11da23fcd5a70 Mon Sep 17 00:00:00 2001 From: CorpNewt <12772521+corpnewt@users.noreply.github.com> Date: Sun, 4 Oct 2020 17:33:54 -0500 Subject: [PATCH] Update plist.py, downloader.py from pymodules --- Scripts/plist.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Scripts/plist.py b/Scripts/plist.py index 0b58efc..ef61291 100755 --- a/Scripts/plist.py +++ b/Scripts/plist.py @@ -28,6 +28,10 @@ except AttributeError: # Helper Methods # ### ### +def get_data(value): + if sys.version_info < (3,0): return plistlib.Data(value) + return value + def _check_py3(): return sys.version_info >= (3, 0) @@ -134,8 +138,8 @@ def loads(value, fmt=None, use_builtin_types=None, dict_type=dict): try: return load(BytesIO(value),fmt=fmt,use_builtin_types=use_builtin_types,dict_type=dict_type) except: - # Python 3.9 removed use_builtin_types - return load(BytesIO(value),fmt=fmt,dict_type=dict_type) + # Python 3.9 removed use_builtin_types + return load(BytesIO(value),fmt=fmt,dict_type=dict_type) def dump(value, fp, fmt=FMT_XML, sort_keys=True, skipkeys=False): if _check_py3(): plistlib.dump(value, fp, fmt=fmt, sort_keys=sort_keys, skipkeys=skipkeys)