summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-01-20 16:09:19 +0100
committernfnty <git@nfnty.se>2017-01-21 23:09:24 +0100
commit1687e0f41f172cef6923f75f4c6f1038f19671dc (patch)
tree6b9fcb40ed3637cf13a8a9be9975504aadb5e90b /doc
parente53369588ee44a9fc4ec75228dc041448aa778d4 (diff)
downloadranger-1687e0f41f172cef6923f75f4c6f1038f19671dc.tar.gz
linting: pylint: Enable `broad-except`, Improve logging
Handle exceptions explicitly to prevent unexpected errors from causing
problems.

Improve exception and notification logging.
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/tools/print_colors.py4
1 files changed, 2 insertions, 2 deletions
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)