Typing 'from a import b' threw an error if b was not found. Accidentally moved this...
authorIan Thompson <quornian@googlemail.com>
Fri, 8 Aug 2008 15:54:04 +0000 (15:54 +0000)
committerIan Thompson <quornian@googlemail.com>
Fri, 8 Aug 2008 15:54:04 +0000 (15:54 +0000)
release/scripts/bpymodules/BPyTextPlugin.py

index 5143229f8293b1396005c4cac4437175cf81132f..870194880b32d16d80498106f93628aca6eeb5df 100644 (file)
@@ -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