Comment 33 for bug 846044

Revision history for this message
In , Michael Vogt (mvo) wrote :

Created attachment 68472
Patch that allows exceptions with unicode error messages

Hi,

I got a crash report releated to unicode for "aptdaemon" and was able to trigger it with the following code fragment.
""""
#!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
e = dbus.exceptions.DBusException(u"bäää")
msg= e.get_dbus_message()
"""
it would be nice if dbus-python would support that, especially since get_dbus_message() returns a unicode object in py2.

Attached is a patch with testcases that works for me and got a brief
review from Barry Warsaw as well.

I'm happy to adjust the patch as needed, just let me know your thoughts.

Cheers,
 Michael