From 2ee4dc85051ebb01a88ffd49ed513b65ccc651c8 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 25 Nov 2016 21:35:10 +0100 Subject: Handling Ctrl+C/Ctrl+D a bit more gracefully --- ql/console.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ql') 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) -- cgit v1.2.3