1
0
forked from VimPlug/jedi

Don't assume either namespace is not-None

This commit is contained in:
Laurens Van Houtven
2013-06-23 22:02:37 +02:00
parent 7eff1bbf06
commit 58b165e4b6
2 changed files with 2 additions and 2 deletions

View File

@@ -333,7 +333,7 @@ def _enables_absolute_import(imp):
Checks if the import is a ``__future__`` import that enables the
``absolute_import`` feature.
"""
if imp.namespace is None:
if imp.from_ns is None or imp.namespace is None:
return False
namespace, feature = imp.from_ns.names[0], imp.namespace.names[0]