launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01342
Re: [Merge] lp:~wgrant/launchpad/bug-629921-packages-empty-filter into lp:launchpad/devel
On Sat, Oct 2, 2010 at 8:19 PM, William Grant <me@xxxxxxxxxxxxxxxxxx> wrote:
>
> - if requested_name_filter is not None:
> + if (requested_name_filter is not None and
> + len(requested_name_filter[0]) > 0):
> return requested_name_filter[0]
I would write this as
'if requested_name_filter and requested_name_filter[0]:'
Its more correct (if requested_name_filter[0] = None, your code will crash).
Looks good otherwise.
-Rob
--
https://code.launchpad.net/~wgrant/launchpad/bug-629921-packages-empty-filter/+merge/37339
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-629921-packages-empty-filter into lp:launchpad/devel.
References