summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-09-15 23:55:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-09-15 23:55:01 (GMT)
commitc237f8e0cea1a79a653183f2990d51989b5ffaf5 (patch)
treedd7d27295b10833cc4592c75e54cdc1da9124b69
parent687dfd20d663c57ae90bf9b923bb558fa45bb34c (diff)
downloadcpython-c237f8e0cea1a79a653183f2990d51989b5ffaf5.zip
cpython-c237f8e0cea1a79a653183f2990d51989b5ffaf5.tar.gz
cpython-c237f8e0cea1a79a653183f2990d51989b5ffaf5.tar.bz2
Merged revisions 66470 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r66470 | benjamin.peterson | 2008-09-15 18:29:43 -0500 (Mon, 15 Sep 2008) | 1 line don't use os.linesep for newlines; it breaks tests on windows ........
-rw-r--r--Lib/lib2to3/fixes/fix_metaclass.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py
index e291dd7..7479024 100644
--- a/Lib/lib2to3/fixes/fix_metaclass.py
+++ b/Lib/lib2to3/fixes/fix_metaclass.py
@@ -17,8 +17,6 @@
"""
# Author: Jack Diederich
-import os
-
# Local imports
from .. import fixer_base
from ..pygram import token
@@ -216,7 +214,7 @@ class FixMetaclass(fixer_base.BaseFix):
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 @@ class FixMetaclass(fixer_base.BaseFix):
# 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'))