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:
parent
7f678583a9
commit
a6061cd1d3
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue