diff options
Diffstat (limited to 'pylint/checkers/variables.py')
-rw-r--r-- | pylint/checkers/variables.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py index 7629a7b..b7a114d 100644 --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -44,7 +44,7 @@ def _is_from_future_import(stmt, name): """Check if the name is a future import from another module.""" try: module = stmt.do_import_module(stmt.modname) - except astroid.InferenceError: + except astroid.AstroidBuildingException: return for local_node in module.locals.get(name, []): @@ -1014,7 +1014,7 @@ builtins. Remember that you should avoid to define new builtins when possible.' name_parts = node.modname.split('.') try: module = node.do_import_module(name_parts[0]) - except Exception: + except astroid.AstroidBuildingException: return module = self._check_module_attrs(node, module, name_parts[1:]) if not module: |