Skip to content
Snippets Groups Projects
Commit c26c8322 authored by Ruben Rodriguez's avatar Ruben Rodriguez
Browse files

Added dbus-python: Backported GObject import method from 1.1.1

parent ac12f0b5
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
#
# Copyright (C) 2008-2010 Rubén Rodríguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=1
. ./config
cat << EOF | patch -p0
--- dbus/gobject_service.py.orig 2012-01-27 16:52:13.000000000 +0100
+++ dbus/gobject_service.py 2013-07-11 21:25:25.937253558 +0200
@@ -24,7 +24,15 @@
__all__ = ['ExportedGObject']
-from gi.repository import GObject as gobject
+import sys
+
+if 'gi' in sys.modules:
+ # this worked in dbus-python 1.0, so preserve the functionality
+ from gi.repository import GObject as gobject
+else:
+ # this worked in dbus-python < 1.0
+ import gobject
+
import dbus.service
# The odd syntax used here is required so that the code is compatible with
EOF
changelog "Backported GObject import method from 1.1.1"
compile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment