diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_exitfunc.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_exitfunc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/lib2to3/fixes/fix_exitfunc.py b/Lib/lib2to3/fixes/fix_exitfunc.py index 2e47887..3f3fbbf 100644 --- a/Lib/lib2to3/fixes/fix_exitfunc.py +++ b/Lib/lib2to3/fixes/fix_exitfunc.py @@ -42,9 +42,9 @@ class FixExitfunc(fixer_base.BaseFix): return func = results["func"].clone() - func.prefix = "" + func.prefix = u"" register = pytree.Node(syms.power, - Attr(Name("atexit"), Name("register")) + Attr(Name(u"atexit"), Name(u"register")) ) call = Call(register, [func], node.prefix) node.replace(call) @@ -59,13 +59,13 @@ class FixExitfunc(fixer_base.BaseFix): names = self.sys_import.children[1] if names.type == syms.dotted_as_names: names.append_child(Comma()) - names.append_child(Name("atexit", " ")) + names.append_child(Name(u"atexit", u" ")) else: containing_stmt = self.sys_import.parent position = containing_stmt.children.index(self.sys_import) stmt_container = containing_stmt.parent new_import = pytree.Node(syms.import_name, - [Name("import"), Name("atexit", " ")] + [Name(u"import"), Name(u"atexit", u" ")] ) new = pytree.Node(syms.simple_stmt, [new_import]) containing_stmt.insert_child(position + 1, Newline()) |