Skip to content

Commit

Permalink
Make CTRL-C behave the same as Q, without complaining about non-empty…
Browse files Browse the repository at this point in the history
… error log.
  • Loading branch information
alexeyklyukin committed Jun 24, 2015
1 parent b3e4ce1 commit 18f5fe9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pg_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3298,9 +3298,7 @@ def main():
loop(collectors, consumer, groups, output_method)
logger.addHandler(log_stderr)
except KeyboardInterrupt:
print('Interrupted by user')
if os.stat(LOG_FILE_NAME)[stat.ST_SIZE] != 0:
print('Errors detected, see {0} for warnings and errors output'.format(LOG_FILE_NAME))
pass
except curses.error:
print(traceback.format_exc())
if 'SSH_CLIENT' in os.environ and 'SSH_TTY' not in os.environ:
Expand Down

0 comments on commit 18f5fe9

Please sign in to comment.