[Python-checkins] r77095 - sandbox/trunk/2to3/lib2to3/fixer_util.py

benjamin.peterson python-checkins at python.org
Mon Dec 28 21:49:24 CET 2009


Author: benjamin.peterson
Date: Mon Dec 28 21:49:23 2009
New Revision: 77095

Log:
remove unused flag

Modified:
   sandbox/trunk/2to3/lib2to3/fixer_util.py

Modified: sandbox/trunk/2to3/lib2to3/fixer_util.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/fixer_util.py	(original)
+++ sandbox/trunk/2to3/lib2to3/fixer_util.py	Mon Dec 28 21:49:23 2009
@@ -291,8 +291,6 @@
     if does_tree_import(package, name, root):
         return
 
-    add_newline_before = False
-
     # figure out where to insert the new import.  First try to find
     # the first import and then skip to the last one.
     insert_pos = offset = 0
@@ -312,7 +310,6 @@
             if node.type == syms.simple_stmt and node.children and \
                node.children[0].type == token.STRING:
                 insert_pos = idx + 1
-                add_newline_before
                 break
 
     if package is None:
@@ -324,8 +321,6 @@
         import_ = FromImport(package, [Leaf(token.NAME, name, prefix=u' ')])
 
     children = [import_, Newline()]
-    if add_newline_before:
-        children.insert(0, Newline())
     root.insert_child(insert_pos, Node(syms.simple_stmt, children))
 
 


More information about the Python-checkins mailing list