From 472c9a2d8c29a526b0b69cd6c4a5dfdaedfc11b7 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 3 Sep 2024 19:27:20 +0200 Subject: [PATCH] packages.py: Fix invocation of gentoo-packages without subcommand Symptom was: > # gentoo-packages --pkgdir XXX > ERROR: 'Namespace' object has no attribute 'command_func' --- binary_gentoo/internal/cli/packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binary_gentoo/internal/cli/packages.py b/binary_gentoo/internal/cli/packages.py index 4c94c03..63c8788 100644 --- a/binary_gentoo/internal/cli/packages.py +++ b/binary_gentoo/internal/cli/packages.py @@ -155,7 +155,7 @@ def parse_command_line(argv): add_version_argument_to(parser) add_pkgdir_argument_to(parser) - subcommands = parser.add_subparsers(title='subcommands') + subcommands = parser.add_subparsers(title='subcommands', required=True) delete_command = subcommands.add_parser('delete', help='drop package entries and '