From 2d14d0d1ec4e28323c733e8f4e6c0de22dbce1dc Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 20 Sep 2022 10:03:02 +0200 Subject: [PATCH] Fix 'osc lock' command --- osc/commandline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 118e952d..34d73fbf 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -3749,13 +3749,17 @@ Please submit there instead, or use --nodevelproject to force direct submission. @cmdln.option('-m', '--message', metavar='TEXT', help='specify log message TEXT') - def do_lock(self, subcmd, opts, project, package=None): + @cmdln.option('project') + @cmdln.option('package', nargs='?') + def do_lock(self, subcmd, opts): """ Locks a project or package usage: osc lock PROJECT [PACKAGE] """ + project = opts.project + package = opts.package apiurl = self.get_api_url() kind = 'prj' path_args = (project,)