Bytearray definitely doesnt work for me in python3, but passing the plist string directly to loads() does.
https://docs.python.org/3/library/plistlib.html#plistlib.loads "Loads a plist from a bytes object"
Code:
Python 3.4.2 (default, Jan 12 2015, 11:38:40)
[GCC 4.9.2 20141224 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import plistlib
>>> plistlib.loads("")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/plistlib.py", line 1004, in loads
fp = BytesIO(value)
TypeError: 'str' does not support the buffer interface
Should really be a bytearray.
And python2 equivalent function takes a string:
https://docs.python.org/2/library/plistlib.html#plistlib.readPlistFromString "Read a plist from a string."