Package: sushi / 1.4.0+git20160822+dfsg-4.1

nigiri-00-fix-gobject-import.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Description: fix following ImportError error:
#  ImportError: When using gi.repository you must not import static modules
#  like "gobject". Please change all occurrences of "import gobject" to
#  "from gi.repository import GObject".
#  See: https://bugzilla.gnome.org/show_bug.cgi?id=709183
# Author: Devid Antonio Filoni <d.filoni@ubuntu.com>
# Last-Update: 2017-03-18
Index: sushi-1.4.0+git20160822+dfsg/nigiri/main.py.in
===================================================================
--- sushi-1.4.0+git20160822+dfsg.orig/nigiri/main.py.in
+++ sushi-1.4.0+git20160822+dfsg/nigiri/main.py.in
@@ -32,7 +32,7 @@ import sys
 import traceback
 
 import glib
-import gobject
+from gi.repository import GObject
 
 try:
 	import urwid
@@ -44,7 +44,7 @@ except ImportError, e:
 from urwid import MetaSignals
 
 try:
-	import gobject
+	from gi.repository import GObject
 except ImportError:
 	print >> sys.stderr, "You need python-gobject installed."
 	sys.exit(1)
Index: sushi-1.4.0+git20160822+dfsg/nigiri/plugin_control.py
===================================================================
--- sushi-1.4.0+git20160822+dfsg.orig/nigiri/plugin_control.py
+++ sushi-1.4.0+git20160822+dfsg/nigiri/plugin_control.py
@@ -38,7 +38,7 @@ unload(filename)
 -> del plugins[filename]
 """
 
-import gobject
+from gi.repository import GObject
 import os
 import imp
 import sys