Cc: Maurice Ma <maurice...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Richard Thomaiyar <richard.marian.thomai...@intel.com>
---
 IntelFsp2Pkg/Tools/GenCfgOpt.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py
index 7658b7f..d8038e9 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -1428,11 +1428,12 @@ def Main():
             else:
                 OutFile = sys.argv[4]
                 Start = 5
-            GenCfgOpt.ParseBuildMode(sys.argv[3])
-            if GenCfgOpt.ParseMacros(sys.argv[Start:]) != 0:
-                print "ERROR: Macro parsing failed !"
-                return 3
+            if argc > Start:
+                if GenCfgOpt.ParseMacros(sys.argv[Start:]) != 0:
+                    print "ERROR: Macro parsing failed !"
+                    return 3
 
+        GenCfgOpt.ParseBuildMode(sys.argv[3])
         FvDir = sys.argv[3]
         if not os.path.exists(FvDir):
             os.makedirs(FvDir)
-- 
2.9.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to