diff --git a/kupfer/plugin/empathy.py b/kupfer/plugin/empathy.py index cb5dd1918..873b9e41d 100644 --- a/kupfer/plugin/empathy.py +++ b/kupfer/plugin/empathy.py @@ -12,6 +12,7 @@ from kupfer import icons from kupfer import plugin_support +from kupfer import pretty from kupfer.objects import Leaf, Action, Source, AppLeaf from kupfer.weaklib import dbus_signal_connect_weakly from kupfer.obj.helplib import PicklingHelperMixin @@ -67,10 +68,13 @@ EMPATHY_CONTACT_ID = "EMPATHY_CONTACT_ID" def _create_dbus_connection(): - sbus = dbus.SessionBus() - proxy_obj = sbus.get_object(ACCOUNTMANAGER_IFACE, ACCOUNTMANAGER_PATH) - dbus_iface = dbus.Interface(proxy_obj, DBUS_PROPS_IFACE) - return dbus_iface + try: + sbus = dbus.SessionBus() + proxy_obj = sbus.get_object(ACCOUNTMANAGER_IFACE, ACCOUNTMANAGER_PATH) + dbus_iface = dbus.Interface(proxy_obj, DBUS_PROPS_IFACE) + return dbus_iface + except dbus.DBusException as exc: + pretty.print_exc(__name__) class EmpathyContact(JabberContact):