Merge lp:~pefarrell/spud/child-elements-of-choice into lp:spud

Proposed by Patrick Farrell
Status: Merged
Merged at revision: 522
Proposed branch: lp:~pefarrell/spud/child-elements-of-choice
Merge into: lp:spud
Diff against target: 27 lines (+3/-5)
1 file modified
diamond/diamond/tree.py (+3/-5)
To merge this branch: bzr merge lp:~pefarrell/spud/child-elements-of-choice
Reviewer Review Type Date Requested Status
Cian Wilson Approve
Review via email: mp+97185@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Cian Wilson (cwilson) wrote :

This has been tested on natty and a mac for a few days now with no issues seen.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'diamond/diamond/tree.py'
2--- diamond/diamond/tree.py 2012-02-28 19:39:38 +0000
3+++ diamond/diamond/tree.py 2012-03-13 10:45:57 +0000
4@@ -230,20 +230,18 @@
5 outlist = []
6
7 for tree in treelist:
8- new_tree = None
9 found = False
10 for t in self.children:
11 if t.schemaname == tree.schemaname:
12- tree = t
13+ outlist.append(t)
14 found = True
15- break
16+
17 if not found:
18 tree.set_parent(self)
19
20 self.children.append(tree)
21 tree.recompute_validity()
22-
23- outlist.append(tree)
24+ outlist.append(tree)
25
26 for tree in outlist:
27 if tree.cardinality in ['+', '*']:

Subscribers

People subscribed via source and target branches