Update AMB with amb-qt(qml) plugins to latest
[AGL/meta-agl.git] / meta-ivi-common / recipes-automotive / automotive-message-broker / automotive-message-broker / 0005-ambctl-remove-unnecessary-dependency-on-glib-introsp.patch
1 From 261e0d119463c648baaf6c3d4be989ca710f9c05 Mon Sep 17 00:00:00 2001
2 From: Petr Nechaev <petr.nechaev@cogentembedded.com>
3 Date: Wed, 29 Jul 2015 18:00:08 +0300
4 Subject: [PATCH 5/9] ambctl: remove unnecessary dependency on glib
5  introspection Python binding
6
7 "gobject" from pygobject is enough for the task.
8 ---
9  tools/ambctl.py | 9 +++++----
10  1 file changed, 5 insertions(+), 4 deletions(-)
11
12 diff --git a/tools/ambctl.py b/tools/ambctl.py
13 index cb091a7..b0b9fd4 100644
14 --- a/tools/ambctl.py
15 +++ b/tools/ambctl.py
16 @@ -8,7 +8,8 @@ import fileinput
17  import termios, fcntl, os
18  import curses.ascii
19  import traceback
20 -from gi.repository import GObject, GLib
21 +import gobject
22 +import glib
23  
24  from dbus.mainloop.glib import DBusGMainLoop
25  
26 @@ -545,14 +546,14 @@ if args.command == "stdin":
27                 oldflags = fcntl.fcntl(fd, fcntl.F_GETFL)
28                 fcntl.fcntl(fd, fcntl.F_SETFL, oldflags | os.O_NONBLOCK)
29  
30 -               io_stdin = GLib.IOChannel(fd)
31 -               io_stdin.add_watch(GLib.IO_IN, handle_keyboard, data)
32 +               io_stdin = glib.IOChannel(fd)
33 +               io_stdin.add_watch(glib.IO_IN, handle_keyboard, data)
34  
35                 try:
36                         erase_line()
37                         display_prompt()
38                         sys.stdout.flush()
39 -                       main_loop = GObject.MainLoop()
40 +                       main_loop = gobject.MainLoop()
41                         main_loop.run()
42                 except KeyboardInterrupt:
43                         sys.exit()
44 -- 
45 1.9.1
46