Skip to content

Commit

Permalink
fix: self import is no problem: just return root module
Browse files Browse the repository at this point in the history
  • Loading branch information
Emile Anclin committed Nov 9, 2010
1 parent c55753f commit 9684d0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def do_import_module(self, modname):
# 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):
Expand Down

0 comments on commit 9684d0f

Please sign in to comment.