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

Pierre-Yves Chibon pingou at pingoured.fr
Mon Feb 18 08:01:09 UTC 2013


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.

Pierre


More information about the copr-devel mailing list