summaryrefslogtreecommitdiff
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:22:32 +0300
commit3b95628c7aa2b2c5ae173d0982edec0749760873 (patch)
treedf789f763fd9c96101f140ebbb57a402d3bd915e
parentcafbc87f063bacf72d98f51d61c37b6671b0c045 (diff)
downloadastroid-git-3b95628c7aa2b2c5ae173d0982edec0749760873.tar.gz
Use the correct _replace member. Thanks to @dirthead for finding the bug. Close #368
-rw-r--r--astroid/modutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py
index bbfaf81b..b39d03d9 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -600,7 +600,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)