From 9e7ed9bb20f4517c241cb9a9817933f4cd0bf4de Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Wed, 20 Jul 2005 20:38:09 +0000 Subject: [PATCH] fix a tb when dbus module was not avaiable --- src/remote_control.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/remote_control.py b/src/remote_control.py index 6e7b28ab7..1629d62b7 100644 --- a/src/remote_control.py +++ b/src/remote_control.py @@ -28,9 +28,10 @@ _ = i18n._ try: import dbus -except: + _version = getattr(dbus, 'version', (0, 20, 0)) +except ImportError: pass -_version = getattr(dbus, 'version', (0, 20, 0)) + if _version >= (0, 41, 0): import dbus.service import dbus.glib # cause dbus 0.35+ doesn't return signal replies without it @@ -46,7 +47,7 @@ class Remote: def __init__(self, plugin): self.signal_object = None if 'dbus' not in globals(): - print _('D-Bus python bindings are missing in this computer.') + print _('D-Bus python bindings are missing in this computer') print _('D-Bus capabilities of Gajim cannot be used') raise DbusNotSupported() try: