summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-11-25 21:35:10 +0100
committeremkael <emkael@tlen.pl>2016-11-25 22:10:36 +0100
commit2ee4dc85051ebb01a88ffd49ed513b65ccc651c8 (patch)
tree7c0c9e4ff95d7fe576a1aac31c2fbbe6f22a8622
parentf825baa2b0774b4bfe4749060a32df72b0db90fd (diff)
Handling Ctrl+C/Ctrl+D a bit more gracefully
-rwxr-xr-xql/console.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ql/console.py b/ql/console.py
index 6751b83..f797da7 100755
--- a/ql/console.py
+++ b/ql/console.py
@@ -16,7 +16,10 @@ class Console(object):
def run(self):
for table in self.tables:
- self.process_table(table)
+ try:
+ self.process_table(table)
+ except (EOFError, KeyboardInterrupt):
+ break
def process_table(self, table):
lineup = self.get_lineup(table)