]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Warn user the file not found issue instead of break build.
authorBob Feng <bob.c.feng@intel.com>
Mon, 1 Jun 2020 06:40:10 +0000 (14:40 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 7 Jun 2020 13:36:33 +0000 (13:36 +0000)
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>
BaseTools/Source/Python/Trim/Trim.py

index c5638376e41a4cf88c269752ad398dfe38f85c8d..776474b203491568214e3379a21b7d22e6590544 100644 (file)
@@ -281,9 +281,11 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None, Inclu
                         F = File.readlines()\r
                 break\r
         else:\r
-            EdkLogger.error("Trim", "Failed to find include file %s" % Source)\r
+            EdkLogger.warn("Trim", "Failed to find include file %s" % Source)\r
+            return []\r
     except:\r
-        EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)\r
+        EdkLogger.warn("Trim", FILE_OPEN_FAILURE, ExtraData=Source)\r
+        return []\r
 \r
 \r
     # avoid A "include" B and B "include" A\r