summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_execfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_execfile.py')
-rw-r--r--Lib/lib2to3/fixes/fix_execfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_execfile.py b/Lib/lib2to3/fixes/fix_execfile.py
index d8997cf..38d6abc 100644
--- a/Lib/lib2to3/fixes/fix_execfile.py
+++ b/Lib/lib2to3/fixes/fix_execfile.py
@@ -38,7 +38,7 @@ class FixExecfile(fixer_base.BaseFix):
# Wrap the open call in a compile call. This is so the filename will be
# preserved in the execed code.
filename_arg = filename.clone()
- filename_arg.set_prefix(u" ")
+ filename_arg.prefix = u" "
exec_str = String(u"'exec'", u" ")
compile_args = open_expr + [Comma(), filename_arg, Comma(), exec_str]
compile_call = Call(Name(u"compile"), compile_args, u"")
@@ -48,4 +48,4 @@ class FixExecfile(fixer_base.BaseFix):
args.extend([Comma(), globals.clone()])
if locals is not None:
args.extend([Comma(), locals.clone()])
- return Call(Name(u"exec"), args, prefix=node.get_prefix())
+ return Call(Name(u"exec"), args, prefix=node.prefix)