summaryrefslogtreecommitdiff
path: root/astroid/modutils.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2016-10-24 19:21:56 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2016-10-24 19:21:56 +0300
commit99fa655de39e6925b84f67db6ac28b0dd577ef51 (patch)
tree587fbe9def3c66e776c4bc0ea2df8db96867c41b /astroid/modutils.py
parent462af82a642c437fd113b3be487c28bb435f3ac8 (diff)
downloadastroid-git-99fa655de39e6925b84f67db6ac28b0dd577ef51.tar.gz
Use the correct _replace member. Thanks to @dirthead for finding the bug. Close #368
Diffstat (limited to 'astroid/modutils.py')
-rw-r--r--astroid/modutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py
index a0f3318f..efb7c006 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -603,7 +603,7 @@ def _spec_from_modpath(modpath, path=None, context=None):
location = get_source_file(found_spec.location)
return found_spec._replace(location=location, type=spec.ModuleSpec.PY_SOURCE)
except NoSourceFile:
- return found_spec.replace(location=location)
+ return found_spec._replace(location=location)
elif found_spec.type == spec.ModuleType.C_BUILTIN:
# integrated builtin module
return found_spec._replace(location=None)