This is a problem from the changes in r1234 (really), which blindly
calls unicode() on all non-private attributes of an exception instance.
If an exception has a non-ascii bytestring in its arguments, this
exception will occur. Other objects that can't be stringified are also a
potential issue.
The code is currently:
try:
return commands.run_bzr(argv)
except Exception, e:
d = {}
for key, val in e.__dict__.iteritems():
if not key.startswith('_'):
if not isinstance(val, unicode):
val = unicode(val)
d[key] = val
print "%s%s" % (SUB_ERROR,
bencode.bencode((e.__class__.__name__,
encode_unicode_escape(d))))
raise
Adding more try/catch is an option, or being more careful about
accessing the exception instance.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/686735
Title:
bzr crashed with UnicodeDecodeError in run_subprocess_command()
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs