Typing 'from a import b' threw an error if b was not found. Accidentally moved this out of the try block in an earlier tidy-up.
This commit is contained in:
@@ -237,10 +237,9 @@ def parse_text(txt):
|
|||||||
# Try importing name as an attribute of the parent
|
# Try importing name as an attribute of the parent
|
||||||
try:
|
try:
|
||||||
module = __import__(imp_from, globals(), locals(), [imp_name])
|
module = __import__(imp_from, globals(), locals(), [imp_name])
|
||||||
|
imports[imp_symb] = getattr(module, imp_name)
|
||||||
except (ImportError, ValueError, AttributeError, TypeError):
|
except (ImportError, ValueError, AttributeError, TypeError):
|
||||||
pass
|
pass
|
||||||
else:
|
|
||||||
imports[imp_symb] = getattr(module, imp_name)
|
|
||||||
else:
|
else:
|
||||||
imports[imp_symb] = module
|
imports[imp_symb] = module
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user