summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <kevron.m.rees@intel.com>2015-04-07 08:26:00 -0700
committerKevron Rees <kevron.m.rees@intel.com>2015-04-07 10:06:31 -0700
commit5c6105248a5c28923a4c340d87795df2822a16be (patch)
tree126f6930ca06dadda32717bb9a679e5966c5730f
parent2e5f72bcfb06c87ae6c54ad750719101f4885eac (diff)
downloadautomotive-message-broker-5c6105248a5c28923a4c340d87795df2822a16be.tar.gz
[ambctl] use gi.repository
-rw-r--r--tools/ambctl.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/ambctl.py b/tools/ambctl.py
index ef755654..9ddf998f 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
@@ -549,14 +548,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()