Diff between 8232c1a035b1b4078213143312ebecf55328e4a1 and 0b4137c4b59526977d841b3d9add2bc68ad4b1e5

Changed Files

File Additions Deletions Status
test/test-nap +10 -7 modified

Full Patch

diff --git a/test/test-nap b/test/test-nap
index 00a2585..ab67a75 100755
--- a/test/test-nap
+++ b/test/test-nap
@@ -7,6 +7,11 @@ import sys
 import time
 import dbus
 import bluezutils
+import dbus.mainloop.glib
+try:
+  from gi.repository import GObject
+except ImportError:
+  import gobject as GObject
 
 bus = dbus.SystemBus()
 
@@ -29,16 +34,14 @@ if (len(args) < 1):
 else:
 	bridge = args[0]
 
+dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+mainloop = GObject.MainLoop()
+
 server.Register(service, bridge)
 
 print("Server for %s registered for %s" % (service, bridge))
 
 print("Press CTRL-C to disconnect")
 
-try:
-	time.sleep(1000)
-	print("Terminating connection")
-except:
-	pass
-
-server.Unregister(service)
+mainloop.run()