[Erp5-report] r37099 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 14 05:01:54 CEST 2010
Author: nicolas.dumazet
Date: Wed Jul 14 05:01:52 2010
New Revision: 37099
URL: http://svn.erp5.org?rev=37099&view=rev
Log:
only copy the set if we're modifying it
Modified:
erp5/trunk/products/ERP5/Document/SimulationMovement.py
Modified: erp5/trunk/products/ERP5/Document/SimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SimulationMovement.py?rev=37099&r1=37098&r2=37099&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] Wed Jul 14 05:01:52 2010
@@ -690,11 +690,14 @@ class SimulationMovement(Movement, Prope
for id, t in tree_node.visited_movement_dict.iteritems():
subdocument, path = t
- to_check = path_set_to_check.copy()
- to_check.discard(path)
- if not to_check:
- # no more paths to check in this branch
- continue
+ to_check = path_set_to_check
+ # do we need to change/copy the set?
+ if path in to_check:
+ if len(to_check) == 1:
+ # no more paths to check in this branch
+ continue
+ to_check = to_check.copy()
+ to_check.remove(path)
subtree = tree_node.get(id, treeNode())
for d in descendantGenerator(subdocument, subtree, to_check):
yield d
More information about the Erp5-report
mailing list