From: Yu Watanabe Date: Sat, 29 Jul 2023 09:47:48 +0000 (+0900) Subject: ukify: check option length X-Git-Tag: v255-rc1~897^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0876c7ab9329b654e3073a2b3449eca6a32c602;p=thirdparty%2Fsystemd.git ukify: check option length Follow-up for df4a46733a609f1673de0bebb38e89fffd70c16c. --- diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index a6a4a38040d..49317fbf784 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -1484,7 +1484,7 @@ def finalize_options(opts): # Figure out which syntax is being used, one of: # ukify verb --arg --arg --arg # ukify linux initrd… - if opts.positional[0] == 'inspect': + if len(opts.positional) >= 1 and opts.positional[0] == 'inspect': opts.verb = opts.positional[0] opts.files = opts.positional[1:] if not opts.files: