Reviewed-by: Bob Feng<bob.c.f...@intel.com> -----Original Message----- From: Chen, Yuwei <yuwei.c...@intel.com> Sent: Monday, June 1, 2020 2:40 PM To: devel@edk2.groups.io Cc: Feng, Bob C <bob.c.f...@intel.com>; Gao, Liming <liming....@intel.com> Subject: [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build.
From: Bob Feng <bob.c.f...@intel.com> 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 <bob.c.f...@intel.com> Cc: Liming Gao <liming....@intel.com> Signed-off-by: Yuwei Chen <yuwei.c...@intel.com> --- 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60740): https://edk2.groups.io/g/devel/message/60740 Mute This Topic: https://groups.io/mt/74600412/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-