dbus: Set GObject event loop as default DBus loop

This must be done early in the process life cycle to have any effect. In the
MPRIS frontend code is too late. Right before the GObject loop is created in
RootCommand.run() is also too late.

Fixes mopidy/mopidy-mpris#2
This commit is contained in:
Stein Magnus Jodal 2013-11-20 22:20:54 +01:00
parent c781d75985
commit 33d82b0229
2 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,10 @@ import sys
import gobject
gobject.threads_init()
import dbus.mainloop.glib
dbus.mainloop.glib.threads_init()
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
import pykka.debug

View File

@ -2,11 +2,12 @@ from __future__ import unicode_literals
import argparse
import collections
import gobject
import logging
import os
import sys
import gobject
from mopidy import config as config_lib
from mopidy.audio import Audio
from mopidy.core import Core