diff options
author | emkael <emkael@tlen.pl> | 2016-11-25 21:35:10 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-11-25 22:10:36 +0100 |
commit | 2ee4dc85051ebb01a88ffd49ed513b65ccc651c8 (patch) | |
tree | 7c0c9e4ff95d7fe576a1aac31c2fbbe6f22a8622 | |
parent | f825baa2b0774b4bfe4749060a32df72b0db90fd (diff) |
Handling Ctrl+C/Ctrl+D a bit more gracefully
-rwxr-xr-x | ql/console.py | 5 |
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)
|