summaryrefslogtreecommitdiff
path: root/astroid/modutils.py
diff options
context:
space:
mode:
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 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)