[RFC/MERGE] _RulesSearcher.get_selected_items should return consistent output
Marius Kruger
amanic at gmail.com
Thu Apr 16 23:08:32 BST 2009
Hi
I was surprised that _RulesSearcher.get_selected_items
:return: () if no rule matched, otherwise a sequence of name,value
tuples. The sequence is the same length as names,
tuple order matches the order in names, and
undefined preferences are given the value None.
I expected it to always return (('foo', None), ('bar', None)) for
names=('foo','bar'), even if no rules were found for the path
(and not () as per the current behaviour).
I fixed my plugin code to compensate for the current behaviour so I
don't really need this,
but I thought maybe others would also find this strange, so here's a
simple patch.
I thought I'd get some feedback before going so far as writing a test
(you know, maybe I'm way off track with this again :).
--
<| regards
U| Marius
H| <><
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20090416_2356-bzr.rules.patch
Type: text/x-patch
Size: 2800 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090417/71275232/attachment.bin
More information about the bazaar
mailing list