New submission from Paul Arnold <[email protected]>:
In Python 3.1, xdrlib.Packer().pack_fstring() throws a TypeError if called with
a str() (an encoded string bytes() works just fine).
>>> xdrlib.Packer().pack_fstring(6, "foobar")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.1/xdrlib.py", line 81, in pack_fstring
data = data + (n - len(data)) * b'\0'
TypeError: Can't convert 'bytes' object to str implicitly
----------
components: None
messages: 113386
nosy: arnoldp
priority: normal
severity: normal
status: open
title: xdrlib.Packer().pack_fstring throws a TypeError when called with a str()
type: crash
versions: Python 3.1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9544>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com