Mercurial > gnulib
changeset 39067:8f09de412e51
parser: group miscellaneous options in dict
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Thu, 30 Nov 2017 22:53:18 +0300 |
parents | 78be9f46d031 |
children | c81774c414ed |
files | pygnulib/parser.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/parser.py Thu Nov 30 22:52:30 2017 +0300 +++ b/pygnulib/parser.py Thu Nov 30 22:53:18 2017 +0300 @@ -941,9 +941,7 @@ fmt = "--{0}: expected at least one argument" self.__parser.error(fmt.format(mode)) verbosity = namespace.pop("verbosity", 0) - if namespace.pop("dry_run", False): - options |= CommandLine.Option.DryRun - if namespace.pop("single_configure", False): - options |= CommandLine.Option.SingleConfigure - namespace.pop("no_changelog", None) + options = dict(namespace) + options.setdefault("dry_run", False) + options.setdefault("single_configure", False) return (namespace, mode, verbosity, options)