Gustavo Picon  committed 7f5daea

Refactoring: removing unused vars

  • Participants
  • Parent commits 0caacb9

Comments (0)

Files changed (1)

File treebeard/

         # child" to become a "move to sibling" if possible (if it can't
         # be done, it means that we are  adding the first child)
         (pos, target, newdepth, siblings, newpos) = (
-            self._fix_move_to_child(pos, target, target.depth)
+            self._fix_move_to_child(pos, target)
         if target.is_descendant_of(self):
         return oldpath, newpath
-    def _fix_move_to_child(self, pos, target, newdepth):
+    def _fix_move_to_child(self, pos, target):
         "Update preliminar vars in :meth:`move` when moving to a child"
         newdepth = target.depth
-        parent = None
         newpos = None
         siblings = []
         if pos in ('first-child', 'last-child', 'sorted-child'):
             # custom UPDATE, this is only here to update django's object,
             # should be useful in loops
             parent.numchild += 1
-            parent = None
         return pos, target, newdepth, siblings, newpos