Set the default value in BuildReport.py
authorqhuang8 <qhuang8@c2973edb-eda0-4c78-bc6a-9341b269661f>
Wed, 24 Feb 2010 16:26:21 +0000 (16:26 +0000)
committerqhuang8 <qhuang8@c2973edb-eda0-4c78-bc6a-9341b269661f>
Wed, 24 Feb 2010 16:26:21 +0000 (16:26 +0000)
git-svn-id: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/trunk/BaseTools@1899 c2973edb-eda0-4c78-bc6a-9341b269661f

Source/Python/build/BuildReport.py
Source/Python/build/build.py

index fff5d3a..74445fe 100755 (executable)
@@ -1373,10 +1373,12 @@ class BuildReport(object):
         if ReportFile:
             self.ReportList = []
             self.ReportType = []
-            for ReportTypeItem in ReportType:
-                if ReportTypeItem not in self.ReportType:
-                    self.ReportType.append(ReportTypeItem)
-
+            if ReportType: 
+                for ReportTypeItem in ReportType:
+                    if ReportTypeItem not in self.ReportType:
+                        self.ReportType.append(ReportTypeItem)
+            else:
+                self.ReportType = ["PCD", "LIBRARY", "BUILD_FLAGS", "DEPEX", "FLASH", "FIXED_ADDRESS"]
     ##
     # Adds platform report to the list
     #
index cdb7f6d..9705097 100644 (file)
@@ -1682,8 +1682,7 @@ def MyOptionParser():
     Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".")\r
 \r
     Parser.add_option("-y", "--report-file", action="store", dest="ReportFile", help="Create/overwrite the report to the specified filename.")\r
-    Parser.add_option("-Y", "--report-type", action="append", type="choice", choices=['PCD','LIBRARY','FLASH','DEPEX','BUILD_FLAGS','FIXED_ADDRESS', 'EXECUTION_ORDER'],\r
-        dest="ReportType", default=["PCD", "LIBRARY", "BUILD_FLAGS", "DEPEX", "FLASH", "FIXED_ADDRESS"],\r
+    Parser.add_option("-Y", "--report-type", action="append", type="choice", choices=['PCD','LIBRARY','FLASH','DEPEX','BUILD_FLAGS','FIXED_ADDRESS', 'EXECUTION_ORDER'], dest="ReportType", default=[],\r
         help="Flags that control the type of build report to generate.  Must be one of: [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER].  "\\r
              "To specify more than one flag, repeat this option on the command line and the default flag set is [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS]")\r
 \r