[PATCH 1 of 2 V2] [cubicweb-ctl] move to accepting only once instance name per command

Laurent Peuch cortex at worlddomination.be
Thu May 23 13:00:13 CEST 2019


On Wed, May 22, 2019 at 01:35:32PM +0200, NoƩ Gaumont wrote:
> Having a single instance as arguments is a good idea.
> 
> I have some comments/typo, see below.
> 
> Otherwise, looks good to me :)
> 
> On 21/05/2019 17:37, Laurent Peuch wrote:
> ># HG changeset patch
> ># User Laurent Peuch <cortex at worlddomination.be>
> ># Date 1558449372 -7200
> >#      Tue May 21 16:36:12 2019 +0200
> ># Node ID 4372360cb19f1d4edc7a32848fe0b18c9289c290
> ># Parent  8241058763524c3306cddf7f2b52b2bca8211fa0
> >[cubicweb-ctl] move to accepting only once instance name per command
> 
> There is a typo "only one" instead of "only once".
> 
> >      name = 'upgrade'
> >      actionverb = 'upgraded'
> >@@ -638,6 +597,7 @@ class ShellCommand(Command):
> >      name = 'shell'
> >      arguments = '<instance> [batch command file(s)] [-- <script arguments>]'
> >      min_args = 1
> >+    max_args = None
> Why None and not 1 as in InstanceCommand?

It's because if you look at "arguments" it accept more that one and
None means "infinite here".

> >+* All "cubicweb-ctl" command only accept one instance argument from now one
> >+  (instead of 0 to n)
> >+
> There is a typo "from now on" instead of "from now one"

Thx for the other comments :)

Will resend another version with the other patchs in some time in case
I get more feedback in the meantime.

-- 

Laurent Peuch -- Bram



More information about the cubicweb-devel mailing list