[Checkins] Re: SVN: zc.buildout/trunk/src/zc/buildout/buildout.py Fix #149352 : setup sub-command without any argument error

Philipp von Weitershausen philipp at weitershausen.de
Fri Oct 5 09:24:28 EDT 2007


Baiju M wrote:
> Log message for revision 80638:
>   Fix #149352 : setup sub-command without any argument error
>   ref: https://bugs.launchpad.net/bugs/149352
>   
> 
> Changed:
>   U   zc.buildout/trunk/src/zc/buildout/buildout.py
> 
> -=-
> Modified: zc.buildout/trunk/src/zc/buildout/buildout.py
> ===================================================================
> --- zc.buildout/trunk/src/zc/buildout/buildout.py	2007-10-05 12:43:59 UTC (rev 80637)
> +++ zc.buildout/trunk/src/zc/buildout/buildout.py	2007-10-05 12:47:32 UTC (rev 80638)
> @@ -725,6 +725,10 @@
>                  ep.load()(self)
>  
>      def setup(self, args):
> +        if not args:
> +            raise zc.buildout.UserError(
> +                "setup command expects one or more arguments.\n"
> +                )

We can actually do better in this error message: *What* exactly is 
expected for the arguments? Don't tell the user what s/he did wrong 
without telling how to do it correctly!

Also, where are the tests?


-- 
http://worldcookery.com -- Professional Zope documentation and training


More information about the Checkins mailing list