[issue31988] Saving bytearray to binary plist file doesn't work
Serhiy Storchaka
report at bugs.python.org
Wed Nov 8 18:20:21 EST 2017
New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:
>>> import plistlib
>>> plistlib.dumps(bytearray(), fmt=plistlib.FMT_BINARY)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/plistlib.py", line 962, in dumps
dump(value, fp, fmt=fmt, skipkeys=skipkeys, sort_keys=sort_keys)
File "/home/serhiy/py/cpython/Lib/plistlib.py", line 955, in dump
writer.write(value)
File "/home/serhiy/py/cpython/Lib/plistlib.py", line 703, in write
self._flatten(value)
File "/home/serhiy/py/cpython/Lib/plistlib.py", line 741, in _flatten
if (type(value), value) in self._objtable:
TypeError: unhashable type: 'bytearray'
----------
components: Library (Lib)
messages: 305921
nosy: ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Saving bytearray to binary plist file doesn't work
type: behavior
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31988>
_______________________________________
More information about the Python-bugs-list
mailing list