From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web08.792.1605248246605771586 for ; Thu, 12 Nov 2020 22:17:26 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: JsbXSPK8OjixkDu0xymRVRDomUskQ7U1CVKxAfH5YqnFt7uCTsuycMvWcM6Og7KgGmU52Wi57N xsKlPbDRi2Ow== X-IronPort-AV: E=McAfee;i="6000,8403,9803"; a="157453224" X-IronPort-AV: E=Sophos;i="5.77,474,1596524400"; d="scan'208";a="157453224" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 22:17:15 -0800 IronPort-SDR: O/3gN7aSDKwr93/pzueW9U3e0smi9qS1CJPj2ux4P7mpz5o2P+030g5Yu14qvu9jDivBoxKTm1 sJdS1kh3Z1Hw== X-IronPort-AV: E=Sophos;i="5.77,474,1596524400"; d="scan'208";a="542549530" Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.71]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 22:17:14 -0800 From: "Mingyue Liang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH 1/1] BaseTools: Fixed Index out of range. Date: Fri, 13 Nov 2020 14:17:09 +0800 Message-Id: <20201113061709.1939-1-mingyuex.liang@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit information generated by patch of push bz2972. When we update trim.deps This problem occurs when the content is only one line. Therefore, if the content is more than one line, it will be retrieved. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py index b06ef42573fd..5ec26eb98b42 100644 --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py @@ -291,7 +291,8 @@ ${END} targetitem = self.GetRealTarget(source_abs.strip(" :")) targetitem += ": " - targetitem += lines[1] + if len(lines)>=2: + targetitem += lines[1] newcontent.append(targetitem) newcontent.extend(lines[2:]) newcontent.append("\n") -- 2.29.2.windows.2