diff --git a/sphinx/application.py b/sphinx/application.py index b0a1f38eb..343bbee08 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -449,7 +449,7 @@ class Sphinx(object): try: if not ext_meta.get('version'): ext_meta['version'] = 'unknown version' - except: + except Exception: ext_meta = {'version': 'unknown version'} self._extensions[extension] = mod self._extension_metadata[extension] = ext_meta diff --git a/sphinx/ext/napoleon/__init__.py b/sphinx/ext/napoleon/__init__.py index d96c66a76..59c1213c6 100644 --- a/sphinx/ext/napoleon/__init__.py +++ b/sphinx/ext/napoleon/__init__.py @@ -371,7 +371,7 @@ def _skip_member(app, what, name, obj, skip, options): cls = functools.reduce(getattr, mod_path, mod) else: cls = obj.__globals__[cls_path] - except: + except Exception: cls_is_owner = False else: cls_is_owner = (cls and hasattr(cls, name) and diff --git a/sphinx/theming.py b/sphinx/theming.py index 08fdd7d51..49bd707d0 100644 --- a/sphinx/theming.py +++ b/sphinx/theming.py @@ -218,7 +218,7 @@ def load_theme_plugins(): func_or_path = plugin.load() try: path = func_or_path() - except: + except Exception: path = func_or_path if isinstance(path, string_types): diff --git a/sphinx/util/console.py b/sphinx/util/console.py index ee6e4ea91..acba52a9f 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -33,9 +33,7 @@ def get_terminal_width(): struct.pack('hhhh', 0, 0, 0, 0)) height, width = struct.unpack('hhhh', call)[:2] terminal_width = width - except (SystemExit, KeyboardInterrupt): - raise - except: + except Exception: # FALLBACK terminal_width = int(os.environ.get('COLUMNS', 80)) - 1 return terminal_width