Closed Bug 1043285 Opened 10 years ago Closed 10 years ago

StrictOrderingOnAppendList.__add__ throws when its content is not sorted

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

This is what fails for instance: foo = StrictOrderingOnAppendList(['foo']) foo += ['bar'] bar = foo + ['qux']
Blocks: 1043344
Comment on attachment 8461413 [details] [diff] [review] Fix StrictOrderingOnAppendList.__add__ to not throw when the list content is not sorted Review of attachment 8461413 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozbuild/util.py @@ +294,5 @@ > > + new_list = StrictOrderingOnAppendList() > + # Can't extend with self because it may already be the result of > + # several extensions and not be ordered. > + list.__iadd__(new_list, self) I think list.extend(new_list, self) would be more appropriate.
Attachment #8461413 - Flags: review?(gps) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: