CLI: Remove --paths option from list-buildroot

Fixes: https://pagure.io/koji/issue/3106
This commit is contained in:
Jana Cupova 2022-05-10 09:49:11 +02:00 committed by Tomas Kopecek
parent 9eec301f87
commit 26cdb3a8af
2 changed files with 0 additions and 14 deletions

View file

@ -2768,15 +2768,12 @@ def anon_handle_list_buildroot(goptions, session, args):
"[info] List the rpms used in or built in a buildroot"
usage = "usage: %prog list-buildroot [options] <buildroot-id>"
parser = OptionParser(usage=get_usage_str(usage))
parser.add_option("--paths", action="store_true", help=SUPPRESS_HELP)
parser.add_option("--built", action="store_true", help="Show the built rpms")
parser.add_option("--verbose", "-v", action="store_true", help="Show more information")
(options, args) = parser.parse_args(args)
if len(args) != 1:
parser.error("Incorrect number of arguments")
ensure_connection(session, goptions)
if options.paths:
parser.error("--paths option is deprecated and will be removed in 1.30")
buildrootID = int(args[0])
opts = {}
if options.built:

View file

@ -22,17 +22,6 @@ class TestListBuilds(utils.CliTestCase):
%s: error: {message}
""" % (self.progname, self.progname)
def test_list_buildroot_with_paths_option(self):
expected = "--paths option is deprecated and will be removed in 1.30"
self.assert_system_exit(
anon_handle_list_buildroot,
self.options, self.session, ['--paths', '1'],
stderr=self.format_error_message(expected),
exit_code=2,
activate_session=None)
self.ensure_connection_mock.assert_called_once_with(self.session, self.options)
self.session.listRPMs.assert_not_called()
def test_list_buildroot_without_args(self):
self.assert_system_exit(
anon_handle_list_buildroot,