forked from bartvdbraak/blender
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:
parent
a821c8af1e
commit
d42891975b
@ -237,10 +237,9 @@ def parse_text(txt):
|
||||
# Try importing name as an attribute of the parent
|
||||
try:
|
||||
module = __import__(imp_from, globals(), locals(), [imp_name])
|
||||
imports[imp_symb] = getattr(module, imp_name)
|
||||
except (ImportError, ValueError, AttributeError, TypeError):
|
||||
pass
|
||||
else:
|
||||
imports[imp_symb] = getattr(module, imp_name)
|
||||
else:
|
||||
imports[imp_symb] = module
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user