summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorBob Feng <bob.c.feng@intel.com>2020-06-01 14:40:10 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-06-07 13:36:33 +0000
commitcfd73e0065f523e1d56bb32b5c9d48e162c903f8 (patch)
tree98f047bed02c3b506860b297a0e4f37c25adde8f /BaseTools
parent28dd887d68409c8788c858e29063ee599ebaaa91 (diff)
downloadedk2-cfd73e0065f523e1d56bb32b5c9d48e162c903f8.tar.gz
edk2-cfd73e0065f523e1d56bb32b5c9d48e162c903f8.tar.bz2
edk2-cfd73e0065f523e1d56bb32b5c9d48e162c903f8.zip
BaseTools: Warn user the file not found issue instead of break build.
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.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng<bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Trim/Trim.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index c5638376e4..776474b203 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