Simon, Nothing critical and this could go in as-is, but a few nits below.
On Wed, Mar 20, 2013 at 7:42 PM, Simon Glass <s...@chromium.org> wrote: > - raw += LookupEmail(item, alias) > + raw += LookupEmail(item, alias, raise_on_error=not ignore_errors) optional: Change it so functions are consistent about whether it's "raise_on_error" or "ignore_errors" > + >>> EmailPatches(series, 'cover', ['p1', 'p2'], True, False, 'cc-fname', > \ > + False, alias) Doctest that actually tests the raise_on_error? See doctests in gitutil.py for example syntax. > -def LookupEmail(lookup_name, alias=None, level=0): > +def LookupEmail(lookup_name, alias=None, raise_on_error=True, level=0): > """If an email address is an alias, look it up and return the full name > > TODO: Why not just use git's own alias feature? > > Args: > lookup_name: Alias or email address to look up > + alias: Dictionary containing aliases (None to use settings default) > + raise_on_error: True to raise an error when an alias fails to match ...and what happens if you pass False? > + >>> LookupEmail('odd', alias, False) > + \033[1;31mAlias 'odd' not found\033[0m > + [] > + >>> # In this case the loop part will effectively be ignored. > + >>> LookupEmail('loop', alias, False) > + \033[1;31mRecursive email alias at 'other'\033[0m > + \033[1;31mRecursive email alias at 'john'\033[0m > + \033[1;31mRecursive email alias at 'mary'\033[0m > + ['j.blo...@napier.co.nz', 'm.popp...@cloud.net'] optional nit: for optional args it's nice to specify them with keywords, like >>> LookupEmail('loop', alias=alias, raise_on_error=False) Please test the raise_on_error=True case. -Doug _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot