This commit is contained in:
parent
ef850c779c
commit
6fc23e36aa
|
@ -47,6 +47,7 @@ else:
|
||||||
|
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
|
|
||||||
|
existing_session = False
|
||||||
|
|
||||||
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
|
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
|
||||||
|
|
||||||
|
@ -54,6 +55,12 @@ print dbus_objects
|
||||||
|
|
||||||
interface = None
|
interface = None
|
||||||
|
|
||||||
|
if dbus_version < (0,80,0) and "org.deluge_torrent.Deluge" in dbus_objects:
|
||||||
|
existing_session = True
|
||||||
|
elif dbus_version >= (0,80,0):
|
||||||
|
for item in dbus_objects:
|
||||||
|
print item
|
||||||
|
|
||||||
if not "org.deluge_torrent.Deluge" in dbus_objects:
|
if not "org.deluge_torrent.Deluge" in dbus_objects:
|
||||||
print "no existing Deluge session"
|
print "no existing Deluge session"
|
||||||
import deluge, deluge.delugegtk
|
import deluge, deluge.delugegtk
|
||||||
|
|
Loading…
Reference in New Issue