summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mixins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mixins.py b/mixins.py
index c3614d76..7ca4a921 100644
--- a/mixins.py
+++ b/mixins.py
@@ -142,8 +142,8 @@ class FromImportMixIn(BaseClass, FilterStmtsMixin):
# XXX we should investigate deeper if we really want to check
# importing itself: modname and mymodule.name be relative or absolute
if mymodule.relative_to_absolute_name(modname, level) == mymodule.name:
- # FIXME: I don't know what to do here...
- raise InferenceError('module importing itself: %s' % modname)
+ # FIXME: we used to raise InferenceError here, but why ?
+ return mymodule
try:
return mymodule.import_module(modname, level=level)
except (ASTNGBuildingException, SyntaxError):