From c633b39067f2238fdf7eac4c24e98564407d04c3 Mon Sep 17 00:00:00 2001 From: Cedric Brandily Date: Thu, 6 Nov 2014 10:34:49 +0100 Subject: [PATCH] Nicer exit on CTRL-c This change avoids stacktrace print on exit using CTRL-c Change-Id: I03401625c26d6d2b6301c8d6a60ed4a581741768 --- gertty/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gertty/app.py b/gertty/app.py index db1ce89..2ba060f 100644 --- a/gertty/app.py +++ b/gertty/app.py @@ -177,7 +177,10 @@ class App(object): self.status.update(offline=True) def run(self): - self.loop.run() + try: + self.loop.run() + except KeyboardInterrupt: + pass def _quit(self, widget=None): raise urwid.ExitMainLoop()