removeFile crashes because random.choice is trying to index a set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Malcolm Cleaton |
Bug Description
The DiskPool.
You can't do random.choice on pool_entry.comps, because it's a set. This needs:
a) a test
b) to drop random.choice, replacing it with a comment explaining we just use any arbitrary component, and list(pool_
You can't index sets. There don't seem to be any other cases in that file which do that.
http://
http://
Changed in soyuz: | |
assignee: | nobody → malcolmcleaton |
importance: | Untriaged → High |
status: | Unconfirmed → Confirmed |
Changed in soyuz: | |
status: | Fix Committed → Fix Released |
Nitpicks: pool_entry.comps appears to be a dict, not a set. Either way "iter(pool_ entry.comps) .next() " is slightly nicer way to pick an arbitrary element non-destructively, because it doesn't copy the entire collection.