[Rpm-metadata] modifyrepo patch: automatic option defaults

Zdenek Pavlas zpavlas at redhat.com
Thu Sep 26 11:28:24 UTC 2013


Hi!

>      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.

> Detecting the compression type is left as an exercise to the reader

np


More information about the Rpm-metadata mailing list