Home | History | Annotate | Download | only in test
      1 #!/usr/bin/python
      2 
      3 import gobject
      4 import dbus
      5 import dbus.mainloop.glib
      6 
      7 def event(pid, reason, value):
      8 	print "pid %s %s: %s" % (pid, reason, value)
      9 
     10 if __name__ == '__main__':
     11 	dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
     12 
     13 	bus = dbus.SystemBus()
     14 
     15 	bus.add_signal_receiver(event, bus_name="org.chromium.dhcpcd",
     16 	    signal_name = "Event")
     17 
     18 	mainloop = gobject.MainLoop()
     19 	mainloop.run()
     20