diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2016-10-24 19:21:56 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-10-24 19:22:32 +0300 |
commit | 3b95628c7aa2b2c5ae173d0982edec0749760873 (patch) | |
tree | df789f763fd9c96101f140ebbb57a402d3bd915e /astroid/modutils.py | |
parent | cafbc87f063bacf72d98f51d61c37b6671b0c045 (diff) | |
download | astroid-git-3b95628c7aa2b2c5ae173d0982edec0749760873.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.py | 2 |
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) |