diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-03-23 03:09:32 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-03-23 03:09:32 (GMT) |
commit | 331ecb2a4eca575d7b51f79c342fb677332c826d (patch) | |
tree | 8910d697d97759fc2d26350b5cafc09ad3f81556 /Lib | |
parent | 72ae3216b8f0550577e5c9b4122462fa2c2078ca (diff) | |
download | cpython-331ecb2a4eca575d7b51f79c342fb677332c826d.zip cpython-331ecb2a4eca575d7b51f79c342fb677332c826d.tar.gz cpython-331ecb2a4eca575d7b51f79c342fb677332c826d.tar.bz2 |
Merged revisions 79325 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r79325 | benjamin.peterson | 2010-03-22 22:03:55 -0500 (Mon, 22 Mar 2010) | 13 lines
Merged revisions 79313,79324 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r79313 | benjamin.peterson | 2010-03-22 17:59:57 -0500 (Mon, 22 Mar 2010) | 1 line
another case where a symbol is needed
........
r79324 | benjamin.peterson | 2010-03-22 21:59:47 -0500 (Mon, 22 Mar 2010) | 1 line
use unicode literals
........
................
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/lib2to3/fixes/fix_exitfunc.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib2to3/fixes/fix_exitfunc.py b/Lib/lib2to3/fixes/fix_exitfunc.py index 6ba2a67..28d30b8 100644 --- a/Lib/lib2to3/fixes/fix_exitfunc.py +++ b/Lib/lib2to3/fixes/fix_exitfunc.py @@ -40,9 +40,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) @@ -57,14 +57,14 @@ 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("simple_stmt", [new_import]) + new = pytree.Node(syms.simple_stmt, [new_import]) containing_stmt.insert_child(position + 1, Newline()) containing_stmt.insert_child(position + 2, new) |