[Rpm-metadata] modifyrepo patch: automatic option defaults

Michael Schroeder mls at suse.de
Thu Sep 26 15:35:13 UTC 2013


On Thu, Sep 26, 2013 at 07:28:24AM -0400, Zdenek Pavlas wrote:
> >      parser.add_option("--unique-md-filenames", dest="unique_md_filenames",
> > -        help="include the file's checksum in the filename, helps with proxies (default)",
> > -        default=True, action="store_true")
> > -    parser.add_option("--simple-md-filenames", dest="unique_md_filenames",
> > +        help="include the file's checksum in the filename, helps with proxies",
> > +        action="store_true")
> > +    parser.add_option("--simple-md-filenames", dest="simple_md_filenames",
> >          help="do not include the file's checksum in the filename",
> > -        action="store_false")
> > +        action="store_true")
> 
> Are two different names necessary? I'd just drop the default=True part,
> and run the autodetection when unique_md_filenames==None.

Sure, feel free to improve the patch ;-)

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH,  GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}


More information about the Rpm-metadata mailing list