summaryrefslogtreecommitdiff
path: root/astroid/mixins.py
diff options
context:
space:
mode:
authorCeridwen <ceridwenv@gmail.com>2015-07-13 22:16:48 -0400
committerCeridwen <ceridwenv@gmail.com>2015-07-13 22:16:48 -0400
commit3c579ec31e996a143df2e33657c30eae0553c576 (patch)
tree574e1728e1c1321420e92792035bbe5508a618c4 /astroid/mixins.py
parent7d63b41d5a4b0bff2743b22b238244157e20054d (diff)
parent642723c222ae6701d6b8da17039b6e24fd09f235 (diff)
downloadastroid-git-3c579ec31e996a143df2e33657c30eae0553c576.tar.gz
Merge logilab/astroid
Diffstat (limited to 'astroid/mixins.py')
-rw-r--r--astroid/mixins.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/mixins.py b/astroid/mixins.py
index 6edccfbe..d374a49f 100644
--- a/astroid/mixins.py
+++ b/astroid/mixins.py
@@ -125,7 +125,8 @@ class ImportFromMixin(FilterStmtsMixin):
# FIXME: we used to raise InferenceError here, but why ?
return mymodule
try:
- return mymodule.import_module(modname, level=level)
+ return mymodule.import_module(modname, level=level,
+ relative_only=level and level >= 1)
except AstroidBuildingException as ex:
if isinstance(ex.args[0], SyntaxError):
raise InferenceError(str(ex))