fix a tb when dbus module was not avaiable
This commit is contained in:
parent
3838f09c61
commit
9e7ed9bb20
|
@ -28,9 +28,10 @@ _ = i18n._
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import dbus
|
import dbus
|
||||||
except:
|
|
||||||
pass
|
|
||||||
_version = getattr(dbus, 'version', (0, 20, 0))
|
_version = getattr(dbus, 'version', (0, 20, 0))
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
if _version >= (0, 41, 0):
|
if _version >= (0, 41, 0):
|
||||||
import dbus.service
|
import dbus.service
|
||||||
import dbus.glib # cause dbus 0.35+ doesn't return signal replies without it
|
import dbus.glib # cause dbus 0.35+ doesn't return signal replies without it
|
||||||
|
@ -46,7 +47,7 @@ class Remote:
|
||||||
def __init__(self, plugin):
|
def __init__(self, plugin):
|
||||||
self.signal_object = None
|
self.signal_object = None
|
||||||
if 'dbus' not in globals():
|
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')
|
print _('D-Bus capabilities of Gajim cannot be used')
|
||||||
raise DbusNotSupported()
|
raise DbusNotSupported()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue