diff options
author | Kevron Rees <kevron.m.rees@intel.com> | 2015-04-07 08:26:00 -0700 |
---|---|---|
committer | Kevron Rees <tripzero.kev@gmail.com> | 2015-05-06 13:37:16 -0700 |
commit | 6caa07f9e3e0093ddbd8979455b87c1f59b84652 (patch) | |
tree | f46ca7b1c951eb759a83cc4cb8096d937f5d3daf | |
parent | 07218a7d83586a478cf0a2c77c7c1f27e3c895b4 (diff) | |
download | automotive-message-broker-6caa07f9e3e0093ddbd8979455b87c1f59b84652.tar.gz |
[ambctl] use gi.repository
-rw-r--r-- | tools/ambctl.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/ambctl.py b/tools/ambctl.py index 94777232..cb091a73 100644 --- a/tools/ambctl.py +++ b/tools/ambctl.py @@ -4,12 +4,11 @@ import argparse import dbus import sys import json -import gobject import fileinput import termios, fcntl, os -import glib import curses.ascii import traceback +from gi.repository import GObject, GLib from dbus.mainloop.glib import DBusGMainLoop @@ -546,14 +545,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(None, False) + main_loop = GObject.MainLoop() main_loop.run() except KeyboardInterrupt: sys.exit() |