diff options
author | Tim Harder <radhermit@gmail.com> | 2021-02-17 02:55:01 -0700 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2021-02-17 02:55:01 -0700 |
commit | af0f7b0ee37a5cabafa3cedd2b13887639c9c3ca (patch) | |
tree | fa7860511075752a7c0efe8781bc700bcc33ab0b /src/pkgcheck/scripts | |
parent | pkgcheck.scripts: force subcmds to use proper prog settings (diff) | |
download | pkgcheck-af0f7b0ee37a5cabafa3cedd2b13887639c9c3ca.tar.gz pkgcheck-af0f7b0ee37a5cabafa3cedd2b13887639c9c3ca.tar.bz2 pkgcheck-af0f7b0ee37a5cabafa3cedd2b13887639c9c3ca.zip |
pkgcheck: use ArgumentParser from arghparse where possible
Instead of pkgcore's slightly enhanced version that injects config and
domain options.
Diffstat (limited to 'src/pkgcheck/scripts')
-rw-r--r-- | src/pkgcheck/scripts/pkgcheck.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pkgcheck/scripts/pkgcheck.py b/src/pkgcheck/scripts/pkgcheck.py index 43b945a9..a6f53e67 100644 --- a/src/pkgcheck/scripts/pkgcheck.py +++ b/src/pkgcheck/scripts/pkgcheck.py @@ -8,6 +8,7 @@ from functools import partial from operator import attrgetter from pkgcore.util import commandline +from snakeoil.cli import arghparse from .. import argparsers, objects, reporters @@ -15,7 +16,7 @@ from .. import argparsers, objects, reporters argparser = commandline.ArgumentParser( description=__doc__, script=(__file__, __name__)) -reporter_argparser = commandline.ArgumentParser(suppress=True) +reporter_argparser = arghparse.ArgumentParser(suppress=True) reporter_options = reporter_argparser.add_argument_group('reporter options') reporter_options.add_argument( '-R', '--reporter', action='store', default=None, @@ -68,7 +69,7 @@ def _setup_reporter(parser, namespace): parser.error('--format option is only valid when using FormatReporter') -config_argparser = commandline.ArgumentParser(suppress=True) +config_argparser = arghparse.ArgumentParser(suppress=True) config_options = config_argparser.add_argument_group('config options') config_options.add_argument( '--config', action=argparsers.ConfigArg, dest='config_file', @@ -83,7 +84,7 @@ config_options.add_argument( specifying an argument of 'false' or 'no'. """) -repo_argparser = commandline.ArgumentParser(suppress=True) +repo_argparser = arghparse.ArgumentParser(suppress=True) repo_options = repo_argparser.add_argument_group('repo options') repo_options.add_argument( '-r', '--repo', metavar='REPO', dest='target_repo', |