From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.31336.1590993612389426472 for ; Sun, 31 May 2020 23:40:12 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: yuwei.chen@intel.com) IronPort-SDR: IPDddYpCH/B26JZlhGQ3DzJ5d+JK3wF6Jaepl3JZ2A3C/AwBqTE030nCsL/oATu0Lbo0qZm4yw TxdsQP4vBB4Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2020 23:40:12 -0700 IronPort-SDR: im1k5MyQJd2fvd9kKE7D+dv/lfSr1TBlKE47TLkc4dMfxIOv8CJiz9zEl2HCNQ8Un5pV+jtNuR S3DGMsDzNQeA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,459,1583222400"; d="scan'208";a="470214824" Received: from unknown (HELO yuweiche-MOBL.ccr.corp.intel.com) ([10.238.1.4]) by fmsmga005.fm.intel.com with ESMTP; 31 May 2020 23:40:10 -0700 From: yuwei.chen@intel.com To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build. Date: Mon, 1 Jun 2020 14:40:10 +0800 Message-Id: X-Mailer: git-send-email 2.26.1.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bob Feng REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2770 The Trim.py would break the build process when the file not found issue occures, however sometimes we do not care about this issue. This patch changes the error with warning in order to solve this kind of break. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Yuwei Chen --- BaseTools/Source/Python/Trim/Trim.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py index c5638376e41a..776474b20349 100644 --- a/BaseTools/Source/Python/Trim/Trim.py +++ b/BaseTools/Source/Python/Trim/Trim.py @@ -281,9 +281,11 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None, Inclu F = File.readlines() break else: - EdkLogger.error("Trim", "Failed to find include file %s" % Source) + EdkLogger.warn("Trim", "Failed to find include file %s" % Source) + return [] except: - EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source) + EdkLogger.warn("Trim", FILE_OPEN_FAILURE, ExtraData=Source) + return [] # avoid A "include" B and B "include" A -- 2.26.1.windows.1