summaryrefslogtreecommitdiffstats
path: root/meta-ivi-common/recipes-automotive/automotive-message-broker/automotive-message-broker/0005-ambctl-remove-unnecessary-dependency-on-glib-introsp.patch
blob: a6bedce113b28896d7318e165bd4a444b9a99fc2 (plain)
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
43
44
45
46
From 261e0d119463c648baaf6c3d4be989ca710f9c05 Mon Sep 17 00:00:00 2001
From: Petr Nechaev <petr.nechaev@cogentembedded.com>
Date: Wed, 29 Jul 2015 18:00:08 +0300
Subject: [PATCH 5/9] ambctl: remove unnecessary dependency on glib
 introspection Python binding

"gobject" from pygobject is enough for the task.
---
 tools/ambctl.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/ambctl.py b/tools/ambctl.py
index cb091a7..b0b9fd4 100644
--- a/tools/ambctl.py
+++ b/tools/ambctl.py
@@ -8,7 +8,8 @@ import fileinput
 import termios, fcntl, os
 import curses.ascii
 import traceback
-from gi.repository import GObject, GLib
+import gobject
+import glib
 
 from dbus.mainloop.glib import DBusGMainLoop
 
@@ -545,14 +546,14 @@ if args.command == "stdin":
 		oldflags = fcntl.fcntl(fd, fcntl.F_GETFL)
 		fcntl.fcntl(fd, fcntl.F_SETFL, oldflags | os.O_NONBLOCK)
 
-		io_stdin = GLib.IOChannel(fd)
-		io_stdin.add_watch(GLib.IO_IN, handle_keyboard, data)
+		io_stdin = glib.IOChannel(fd)
+		io_stdin.add_watch(glib.IO_IN, handle_keyboard, data)
 
 		try:
 			erase_line()
 			display_prompt()
 			sys.stdout.flush()
-			main_loop = GObject.MainLoop()
+			main_loop = gobject.MainLoop()
 			main_loop.run()
 		except KeyboardInterrupt:
 			sys.exit()
-- 
1.9.1