From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C11E4337E; Mon, 20 Nov 2023 13:48:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D471F42DDE; Mon, 20 Nov 2023 13:47:59 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 0F54242DD2 for ; Mon, 20 Nov 2023 13:47:58 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8541B3200998; Mon, 20 Nov 2023 07:47:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 20 Nov 2023 07:47:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1700484475; x=1700570875; bh=jSz/7dCYN33O4xxYOEcm//kOrbccqG0wBRG oHuC7+F4=; b=lHOanFCp1HF0HdLZwXZ2wQXnl9hVSunKgHrfkFv+a3Zkg9gBGLE BhRxmNvpAi9RLM0P8MWkVdEQaF5gi0/ot6gojBNejsWwH/tJTHz+u1QOU4TTCZIp pBuQIQgHudPstR30YnduI/M7dV2zvkhIKN/CuNoOOO68GaZi8HhHunOepCQcRK6M I9WVYWFS3BoU4eDua7NWU2wTYCOO/JP0Cs9WSnoUWu2MANgdXGSUQb9c5IHCYwPV 4RuOjUMJpPkTCLYicc8UXzhNMzYKRaVF6oqU8spl3qi4dVD0U8p0y5pFgXpJ32pR tKC+oMDcZ+2Jpg5UiLekYYOE1NEJwLiLVHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700484475; x=1700570875; bh=jSz/7dCYN33O4xxYOEcm//kOrbccqG0wBRG oHuC7+F4=; b=bq6bpV05iilVvvacG8CVj9oOF0Xt3vOUClbnceaF/o2JGau9eVJ vNiXpKi5MEKcSNAYiZwdlaxvpjQtgbk+E0hi9GvJXOS8TYFr45qqLcZ0IzQpC2S7 EeqIT6QLG9TYdjAdSI/SMN4/9cdUdyB3k9PU5arBQ7gvC2YGAv7nmni2Wu4CDDfZ J7wjMpgD6875YIT6k77+1IVqraLA84riqPQP7PFmfPce4uMUuL8HaHx7WXsm894m kH5QkR+VptvwiBQ+UlwUhIoip37ambB9MiXKUnz0RqHMpw4gCCcUrLijCwxUBf0L mb9DqLvRzRGuuDYXlIt7BrRrcrbMX+Anqvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegjedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Nov 2023 07:47:54 -0500 (EST) From: Thomas Monjalon To: Robin Jarry Cc: dev@dpdk.org, Bruce Richardson Subject: Re: [PATCH] cmdline-gen: fix error when command list has empty lines Date: Mon, 20 Nov 2023 13:47:52 +0100 Message-ID: <23296006.6Emhk5qWAg@thomas> In-Reply-To: References: <20231116111812.296090-2-rjarry@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 17/11/2023 12:22, Bruce Richardson: > On Thu, Nov 16, 2023 at 12:18:13PM +0100, Robin Jarry wrote: > > Fix the following error when a command list file contains empty lines: > >=20 > > Traceback (most recent call last): > > File "buildtools/dpdk-cmdline-gen.py", line 202, in > > main() > > File "buildtools/dpdk-cmdline-gen.py", line 184, in main > > process_commands(args.infile, sys.stdout, None, args.context_name) > > File "buildtools/dpdk-cmdline-gen.py", line 141, in process_commands > > cmd_inst, h_out, c_out =3D process_command(lineno, tokens.strip().s= pl=E2=80=A6 > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= =E2=80=A6 > > File "buildtools/dpdk-cmdline-gen.py", line 36, in process_command > > if tokens[0].startswith("<"): > > ~~~~~~^^^ > > IndexError: list index out of range > >=20 > > Use shlex.split() to properly split each line arguments into tokens and > > strip comments. > >=20 > > If there are no tokens, ignore the line. > >=20 > > Fixes: 37666691e9ed ("buildtools: add a tool to generate cmdline boiler= plate") > >=20 > > Cc: Bruce Richardson > > Signed-off-by: Robin Jarry > > --- >=20 > LGTM, thanks. >=20 > Acked-by: Bruce Richardson Applied, thanks.