[Mailman-Developers] Click CLI branch

Barry Warsaw barry at list.org
Fri Jul 21 15:08:34 EDT 2017


On Jul 21, 2017, at 11:46, Mark Sapiro <mark at msapiro.net> wrote:
> 
> Another thing I noticed is the help for the withlist --run option says
> in part:
> 
> If additional arguments are given at the end of the command line, they
> are passed as subsequent positional arguments to the callable.  For
> additional help, see --details.
> 
> The additional arguments are not actually passed as subsequent
> positional arguments to the callable.  They are passed as a single
> positional argument which is a tuple of the additional arguments.
> 
> --details is correct in its example showing
> 
> def change(mlist, args):
>    mlist.display_name = args[0]
> 
> but the --run description makes me think it should be
> 
> def change(mlist, name):
>    mlist.display_name = name

Thanks Mark.  I’d like to preserve the API of Mailman 2.1, so I’m changing that back to passing them in as positional arguments (i.e. to match the —run description).

Just testing that change locally now.

Cheers,
-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://mail.python.org/pipermail/mailman-developers/attachments/20170721/d969628e/attachment.sig>


More information about the Mailman-Developers mailing list