From d885df78c6f931abf3259343aaaa897e16c8cba1 Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Sat, 1 Sep 2018 13:20:32 -0700 Subject: Explicitly catch curses.error --- blessings/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blessings/__init__.py b/blessings/__init__.py index 3872b5f..fdceb09 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -97,7 +97,7 @@ class Terminal(object): try: setupterm(kind or environ.get('TERM', 'dumb'), self._init_descriptor) - except: + except curses.error: # There was an error setting up the terminal, either curses is # not supported or TERM is incorrectly set. Fall back to dumb. self._does_styling = False -- cgit v1.2.1