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:
Ian Thompson 2008-08-08 15:54:04 +00:00
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