From 1687e0f41f172cef6923f75f4c6f1038f19671dc Mon Sep 17 00:00:00 2001 From: nfnty Date: Fri, 20 Jan 2017 16:09:19 +0100 Subject: linting: pylint: Enable `broad-except`, Improve logging Handle exceptions explicitly to prevent unexpected errors from causing problems. Improve exception and notification logging. --- doc/tools/print_colors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/tools/print_colors.py b/doc/tools/print_colors.py index 65625cb5..762ac3e3 100755 --- a/doc/tools/print_colors.py +++ b/doc/tools/print_colors.py @@ -15,14 +15,14 @@ def main(win): for color in range(-1, curses.COLORS): try: curses.init_pair(color, color, 0) - except Exception: + except curses.error: pass else: win.addstr(str(color) + ' ', curses.color_pair(color) | attr) curses.start_color() try: curses.use_default_colors() - except Exception: + except curses.error: pass win.addstr("available colors: %d\n\n" % curses.COLORS) print_all_colors(0) -- cgit 1.4.1-2-gfad0