summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_imports.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_imports.py')
-rw-r--r--Lib/lib2to3/fixes/fix_imports.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_imports.py b/Lib/lib2to3/fixes/fix_imports.py
index 46ba4a2..9aeca38 100644
--- a/Lib/lib2to3/fixes/fix_imports.py
+++ b/Lib/lib2to3/fixes/fix_imports.py
@@ -124,7 +124,7 @@ class FixImports(fixer_base.BaseFix):
if import_mod:
mod_name = import_mod.value
new_name = self.mapping[mod_name]
- import_mod.replace(Name(new_name, prefix=import_mod.get_prefix()))
+ import_mod.replace(Name(new_name, prefix=import_mod.prefix))
if "name_import" in results:
# If it's not a "from x import x, y" or "import x as y" import,
# marked its usage to be replaced.
@@ -142,4 +142,4 @@ class FixImports(fixer_base.BaseFix):
bare_name = results["bare_with_attr"][0]
new_name = self.replace.get(bare_name.value)
if new_name:
- bare_name.replace(Name(new_name, prefix=bare_name.get_prefix()))
+ bare_name.replace(Name(new_name, prefix=bare_name.prefix))