]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: skip updating temporary variable.
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Tue, 10 Apr 2018 23:17:22 +0000 (07:17 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 17 Apr 2018 12:48:52 +0000 (20:48 +0800)
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py

index 6ef922d40130a88b04b73ee7d0127f367cdcf5c3..98e3b20bd1e5903ca2ee3c83659b1deb846f29f9 100644 (file)
@@ -256,12 +256,6 @@ class WorkspaceAutoGen(AutoGen):
     def _InitWorker(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,\r
               BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=None, Fvs=None, Caps=None, SkuId='', UniFlag=None,\r
               Progress=None, BuildModule=None):\r
     def _InitWorker(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,\r
               BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=None, Fvs=None, Caps=None, SkuId='', UniFlag=None,\r
               Progress=None, BuildModule=None):\r
-        if Fds is None:\r
-            Fds = []\r
-        if Fvs is None:\r
-            Fvs = []\r
-        if Caps is None:\r
-            Caps = []\r
         self.BuildDatabase  = MetaFileDb\r
         self.MetaFile       = ActivePlatform\r
         self.WorkspaceDir   = WorkspaceDir\r
         self.BuildDatabase  = MetaFileDb\r
         self.MetaFile       = ActivePlatform\r
         self.WorkspaceDir   = WorkspaceDir\r
@@ -276,9 +270,9 @@ class WorkspaceAutoGen(AutoGen):
         self.TargetTxt      = BuildConfig\r
         self.ToolDef        = ToolDefinition\r
         self.FdfFile        = FlashDefinitionFile\r
         self.TargetTxt      = BuildConfig\r
         self.ToolDef        = ToolDefinition\r
         self.FdfFile        = FlashDefinitionFile\r
-        self.FdTargetList   = Fds\r
-        self.FvTargetList   = Fvs\r
-        self.CapTargetList  = Caps\r
+        self.FdTargetList   = Fds if Fds else []\r
+        self.FvTargetList   = Fvs if Fvs else []\r
+        self.CapTargetList  = Caps if Caps else []\r
         self.AutoGenObjectList = []\r
         self._BuildDir      = None\r
         self._FvDir         = None\r
         self.AutoGenObjectList = []\r
         self._BuildDir      = None\r
         self._FvDir         = None\r