mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +00:00
deal with stupid gutsy sometimes not being able to connect to dbus
This commit is contained in:
parent
4b7d40ed49
commit
bb03e2ff6a
1 changed files with 26 additions and 19 deletions
|
@ -113,7 +113,14 @@ def start_deluge():
|
|||
interface = deluge.interface.DelugeGTK()
|
||||
interface.start(get_cmd_line_torrents())
|
||||
|
||||
try:
|
||||
bus = dbus.SessionBus()
|
||||
except:
|
||||
if not deluge.common.windows_check():
|
||||
pid = os.fork()
|
||||
if not pid:
|
||||
os.popen('dbus-launch deluge')
|
||||
else:
|
||||
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
|
||||
|
||||
if not "org.deluge_torrent.Deluge" in dbus_objects:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue