summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeat Bolli <bbolli@ewanet.ch>2011-06-22 11:09:54 +0200
committerEric S. Raymond <esr@thyrsus.com>2011-06-22 12:25:53 -0400
commit3fc3463a4907bd6c52e71d8b3a6709c09f01b030 (patch)
treef5ca71f2eef76741f3cc4015aa7294beb46d8ee4
parent4b65b081aaa268a7b0b381288da33556908ca8fe (diff)
downloadgpsd-3fc3463a4907bd6c52e71d8b3a6709c09f01b030.tar.gz
gps.py: suppress the stack trace on exit
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
-rwxr-xr-xgps/gps.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gps/gps.py b/gps/gps.py
index c987f5f1..deb311df 100755
--- a/gps/gps.py
+++ b/gps/gps.py
@@ -366,7 +366,10 @@ if __name__ == '__main__':
session = gps(**opts)
session.stream(WATCH_ENABLE|WATCH_NEWSTYLE)
- for report in session:
- print report
+ try:
+ for report in session:
+ print report
+ except KeyboardInterrupt:
+ print
# gps.py ends here