PIM: make examples work with recent Python GNOME

Try the traditional "import gobject" first, fall back to GIR
introspection. Needed for distros like Tizen.
This commit is contained in:
Patrick Ohly 2014-05-27 14:29:08 +02:00
parent 7f678583a9
commit a6061cd1d3
2 changed files with 8 additions and 2 deletions

View file

@ -47,7 +47,10 @@
import dbus
import dbus.service
import gobject
try:
import gobject
except ImportError:
from gi.repository import GObject as gobject
from dbus.mainloop.glib import DBusGMainLoop
import functools
import subprocess

View file

@ -30,7 +30,10 @@
import dbus
import dbus.service
import gobject
try:
import gobject
except ImportError:
from gi.repository import GObject as gobject
from dbus.mainloop.glib import DBusGMainLoop
import functools
import sys