diff options
author | Aki Niemi <aki.niemi@nokia.com> | 2010-12-03 14:47:40 +0200 |
---|---|---|
committer | Aki Niemi <aki.niemi@nokia.com> | 2010-12-03 14:47:40 +0200 |
commit | 4da88364951bc03a076ee93e1db23648c10e0b34 (patch) | |
tree | f59cc57d4f68442ba3f57c6eb8d2a80a0faec88a /test/test-push-notification | |
parent | 4f2311b2e2e31d24e1b3dde9301f7d9185f53440 (diff) | |
download | ofono-4da88364951bc03a076ee93e1db23648c10e0b34.tar.bz2 |
test: Unregister agents on keyboard interrupt
Control-C now calls UnregisterAgent(), so the agents exit cleanly.
Diffstat (limited to 'test/test-push-notification')
-rwxr-xr-x | test/test-push-notification | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test-push-notification b/test/test-push-notification index 4dca0d46..11d384cd 100755 --- a/test/test-push-notification +++ b/test/test-push-notification @@ -44,4 +44,9 @@ if __name__ == '__main__': print "Agent registered" mainloop = gobject.MainLoop() - mainloop.run() + + try: + mainloop.run() + except KeyboardInterrupt: + pn.UnregisterAgent(path) + mainloop.run() |