Skip to content

Commit

Permalink
Make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
rogalski authored and PCManticore committed Feb 13, 2017
1 parent e80ed4c commit 3c8b44f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pylint/checkers/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 746,11 @@ def _check_wildcard_imports(self, node):
def _wildcard_import_is_allowed(self, node):
if not self.config.allow_wildcard_with_all:
return False
module = node.do_import_module()
return '__all__' in module.locals
try:
module = node.do_import_module()
return '__all__' in module.locals
except astroid.AstroidImportError:
return False


def register(linter):
Expand Down
2 changes: 1 addition & 1 deletion pylint/test/functional/wildcard_import_allowed.py
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
# pylint: disable=missing-docstring,unused-wildcard-import,redefined-builtin
# pylint: disable=missing-docstring,unused-wildcard-import,redefined-builtin,import-error
from csv import *
from abc import * # [wildcard-import]
from UNINFERABLE import * # [wildcard-import]

0 comments on commit 3c8b44f

Please sign in to comment.