aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-06-29 18:38:08 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2023-06-29 18:38:08 +0300
commit5f1dc5c1d7e2c26cb7ce3353782d472e65a287c3 (patch)
tree58bdbd5005367b3c1f26ded6c72836139ec6ca45 /src/pkgcheck/scripts
parentgithub: add issue templates (diff)
downloadpkgcheck-5f1dc5c1d7e2c26cb7ce3353782d472e65a287c3.tar.gz
pkgcheck-5f1dc5c1d7e2c26cb7ce3353782d472e65a287c3.tar.bz2
pkgcheck-5f1dc5c1d7e2c26cb7ce3353782d472e65a287c3.zip
scan: fix unknown exit checkset during initial config load
Similar to previous fix, `--exit`` also can accept checksets which come from args, so we also need to "escape" failures of ExitArgs. Follows: a2358d60680611d7cbe07068440031c3c6e68f31 Resolves: https://github.com/pkgcore/pkgcheck/issues/594 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src/pkgcheck/scripts')
-rw-r--r--src/pkgcheck/scripts/pkgcheck_scan.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkgcheck/scripts/pkgcheck_scan.py b/src/pkgcheck/scripts/pkgcheck_scan.py
index b83f569f..c04ff329 100644
--- a/src/pkgcheck/scripts/pkgcheck_scan.py
+++ b/src/pkgcheck/scripts/pkgcheck_scan.py
@@ -371,7 +371,9 @@ def _setup_scan(parser, namespace, args):
# have to be parsed twice, will probably require a custom snakeoil
# arghparse method.
# parse command line args to override config defaults
- with patch("pkgcheck.scripts.argparse_actions.ChecksetArgs.__call__", lambda *a, **k: None):
+ with patch(
+ "pkgcheck.scripts.argparse_actions.ChecksetArgs.__call__", lambda *a, **k: None
+ ), patch("pkgcheck.scripts.argparse_actions.ExitArgs.__call__", lambda *a, **k: None):
namespace, _ = parser._parse_known_args(args, namespace)
# Get the current working directory for repo detection and restriction