summaryrefslogtreecommitdiffstats
path: root/test/test-smart-messaging
diff options
context:
space:
mode:
authorAki Niemi <aki.niemi@nokia.com>2010-12-03 14:47:40 +0200
committerAki Niemi <aki.niemi@nokia.com>2010-12-03 14:47:40 +0200
commit4da88364951bc03a076ee93e1db23648c10e0b34 (patch)
treef59cc57d4f68442ba3f57c6eb8d2a80a0faec88a /test/test-smart-messaging
parent4f2311b2e2e31d24e1b3dde9301f7d9185f53440 (diff)
downloadofono-4da88364951bc03a076ee93e1db23648c10e0b34.tar.bz2
test: Unregister agents on keyboard interrupt
Control-C now calls UnregisterAgent(), so the agents exit cleanly.
Diffstat (limited to 'test/test-smart-messaging')
-rwxr-xr-xtest/test-smart-messaging7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test-smart-messaging b/test/test-smart-messaging
index b263eddb..0a37ba14 100755
--- a/test/test-smart-messaging
+++ b/test/test-smart-messaging
@@ -62,4 +62,9 @@ if __name__ == '__main__':
print "Agent registered"
mainloop = gobject.MainLoop()
- mainloop.run()
+
+ try:
+ mainloop.run()
+ except KeyboardInterrupt:
+ pn.UnregisterAgent(path)
+ mainloop.run()