[issue12931] xmlrpclib confuses unicode and string

Ulrich Seidl report at bugs.python.org
Tue May 22 16:26:01 CEST 2012


Ulrich Seidl <Ulrich.Seidl at muneda.com> added the comment:

The change set committed for 2.7 introduces another problem. At the beginning of xmlrpclib.py, there is an explicit test for the availability of unicode:

try:
    unicode
except NameError:
    unicode = None # unicode support not available

In case unicode was set to None, a TypeError:
isinstance() arg 2 must be a class, type, or tuple of classes and types

will be raised by the code introduced to ServerProxy:

if isinstance(uri, unicode):
    uri = uri.encode('ISO-8859-1')

----------
nosy: +uis

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12931>
_______________________________________


More information about the Python-bugs-list mailing list