diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_execfile.py')
| -rw-r--r-- | Lib/lib2to3/fixes/fix_execfile.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/lib2to3/fixes/fix_execfile.py b/Lib/lib2to3/fixes/fix_execfile.py index 09cb6f6..b6c786f 100644 --- a/Lib/lib2to3/fixes/fix_execfile.py +++ b/Lib/lib2to3/fixes/fix_execfile.py @@ -31,7 +31,8 @@ class FixExecfile(fixer_base.BaseFix): # call. execfile_paren = node.children[-1].children[-1].clone() # Construct open().read(). - open_args = ArgList([filename.clone()], rparen=execfile_paren) + open_args = ArgList([filename.clone(), Comma(), String('"rb"', ' ')], + rparen=execfile_paren) open_call = Node(syms.power, [Name("open"), open_args]) read = [Node(syms.trailer, [Dot(), Name('read')]), Node(syms.trailer, [LParen(), RParen()])] |
