openbsd-ports/audio/sonata/patches/patch-sonata_dbus_plugin_py
ajacoutot 981f12e4ea Fix a runtime warning; not that this does not fix the thread related
crash on startup, so it is still broken.
2012-05-05 09:40:43 +00:00

17 lines
648 B
Plaintext

$OpenBSD: patch-sonata_dbus_plugin_py,v 1.1 2012/05/05 09:40:43 ajacoutot Exp $
dbus_plugin.py:26: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
--- sonata/dbus_plugin.py.orig Sat May 5 11:18:55 2012
+++ sonata/dbus_plugin.py Sat May 5 11:20:01 2012
@@ -23,7 +23,8 @@ import sys
try:
import dbus, dbus.service
if getattr(dbus, "version", (0, 0, 0)) >= (0, 41, 0):
- import dbus.glib
+ from dbus.mainloop.glib import DBusGMainLoop
+ DBusGMainLoop(set_as_default=True)
if getattr(dbus, "version", (0, 0, 0)) >= (0, 80, 0):
import _dbus_bindings as dbus_bindings
NEW_DBUS = True