mirror of
https://github.com/logos-storage/deluge.git
synced 2026-01-12 10:03:07 +00:00
13 lines
508 B
Python
13 lines
508 B
Python
# Import all we will use in deluge
|
|
from dbus import Interface, SessionBus, version
|
|
|
|
# Code for dbus_importing borrowed from Listen (http://listen-project.org)
|
|
# I couldn't figure out how to use dbus without breaking on versions past
|
|
# 0.80.0. I finally found a solution by reading the source code from the
|
|
# Listen project.
|
|
if version >= (0,41,0) and version < (0,80,0):
|
|
import dbus.glib
|
|
elif version >= (0,80,0):
|
|
from dbus.mainloop.glib import DBusGMainLoop
|
|
DBusGMainLoop(set_as_default=True)
|