kill support for old versions of dbus [noone runs it, noone tests it] fixes #1912
This commit is contained in:
parent
ea6427a004
commit
b4b96c837c
|
@ -23,7 +23,11 @@ from common import exceptions
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import dbus
|
import dbus
|
||||||
version = getattr(dbus, 'version', (0, 20, 0))
|
import dbus.service
|
||||||
|
# cause dbus 0.35+ doesn't return signal replies without it
|
||||||
|
import dbus.glib
|
||||||
|
|
||||||
|
version = getattr(dbus, 'version')
|
||||||
supported = True
|
supported = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
version = (0, 0, 0)
|
version = (0, 0, 0)
|
||||||
|
@ -32,14 +36,6 @@ except ImportError:
|
||||||
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')
|
||||||
|
|
||||||
# dbus 0.23 leads to segfault with threads_init()
|
|
||||||
if sys.version[:4] >= '2.4' and version[1] < 30:
|
|
||||||
supported = False
|
|
||||||
|
|
||||||
if version >= (0, 41, 0):
|
|
||||||
import dbus.service
|
|
||||||
import dbus.glib # cause dbus 0.35+ doesn't return signal replies without it
|
|
||||||
|
|
||||||
class SessionBus:
|
class SessionBus:
|
||||||
'''A Singleton for the DBus SessionBus'''
|
'''A Singleton for the DBus SessionBus'''
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in New Issue