[PATCH 4/4] Move the URL to copr into the config file

Bohuslav Kabrda bkabrda at redhat.com
Mon Feb 18 14:14:17 UTC 2013


----- Original Message -----
> 
> 
> On Mon, 18 Feb 2013, Pierre-Yves Chibon wrote:
> 
> > On Mon, Feb 18, 2013 at 02:53:22AM -0500, Bohuslav Kabrda wrote:
> >> ----- Original Message -----
> >>> On Mon, Feb 18, 2013 at 01:53:53AM -0500, Bohuslav Kabrda wrote:
> >>>> All four patches look fine to me, please go ahead and commit (if
> >>>> you were waiting for my review, please don't wait next time - at
> >>>> least not with copr_cli related stuff, I'd only like to review
> >>>> patches that go into the frontend itself).
> >>>
> >>> Noted, but I was hoping to get some feed-back on the approach I
> >>> took
> >>> (using
> >>> argparse, the way I handle subcommands & all).
> >>
> >> What about using subparsers? [1] I've used them quite successfully
> >> in one of my projects (although there is an ugly regression from
> >> python2 to python3 - in python2, subparsers can't be made
> >> optional; in python3, they are optional by default - but I think
> >> you just need to get a subparser for each action and that's it).
> >> [1] http://docs.python.org/dev/library/argparse.html#sub-commands
> >
> > Looks like exactly what I was looking for, I coded this on the
> > train with no
> > internet, so I relied on what I used in pkgdb-cli but I wasn't
> > really happy with
> > it. This looks much nicer, I'll give it a try.
> 
> +1 to the subparsers. To be sure, do they function the same in rhel6
> as in
> fedora 18?
> 
> -sv
> 

AFAIK the only regression is between Python2 and Python3 builtin argparse. Python2.7 builtin argparse should be pretty much the same as the standalone argparse used with Python2.6 (so yes, they function the same).

-- 
Regards,
Bohuslav "Slavek" Kabrda.


More information about the copr-devel mailing list