[Python-checkins] r66470 - sandbox/trunk/2to3/lib2to3/fixes/fix_metaclass.py
benjamin.peterson
python-checkins at python.org
Tue Sep 16 01:29:43 CEST 2008
Author: benjamin.peterson
Date: Tue Sep 16 01:29:43 2008
New Revision: 66470
Log:
don't use os.linesep for newlines; it breaks tests on windows
Modified:
sandbox/trunk/2to3/lib2to3/fixes/fix_metaclass.py
Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_metaclass.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/fixes/fix_metaclass.py (original)
+++ sandbox/trunk/2to3/lib2to3/fixes/fix_metaclass.py Tue Sep 16 01:29:43 2008
@@ -17,8 +17,6 @@
"""
# Author: Jack Diederich
-import os
-
# Local imports
from .. import fixer_base
from ..pygram import token
@@ -216,7 +214,7 @@
pass_leaf = Leaf(text_type, 'pass')
pass_leaf.set_prefix(orig_meta_prefix)
node.append_child(pass_leaf)
- node.append_child(Leaf(token.NEWLINE, os.linesep))
+ node.append_child(Leaf(token.NEWLINE, '\n'))
elif len(suite.children) > 1 and \
(suite.children[-2].type == token.INDENT and
@@ -224,4 +222,4 @@
# there was only one line in the class body and it was __metaclass__
pass_leaf = Leaf(text_type, 'pass')
suite.insert_child(-1, pass_leaf)
- suite.insert_child(-1, Leaf(token.NEWLINE, os.linesep))
+ suite.insert_child(-1, Leaf(token.NEWLINE, '\n'))
More information about the Python-checkins
mailing list