summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/UiSection.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/GenFds/UiSection.py')
-rw-r--r--BaseTools/Source/Python/GenFds/UiSection.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/UiSection.py b/BaseTools/Source/Python/GenFds/UiSection.py
index c9fc5997a1..f643058bd6 100644
--- a/BaseTools/Source/Python/GenFds/UiSection.py
+++ b/BaseTools/Source/Python/GenFds/UiSection.py
@@ -44,7 +44,7 @@ class UiSection (UiSectionClassObject):
# @param Dict dictionary contains macro and its value
# @retval tuple (Generated file name, section alignment)
#
- def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf=None, Dict={}, IsMakefile = False):
+ def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf=None, Dict=None, IsMakefile = False):
#
# Prepare the parameter of GenSection
#
@@ -58,6 +58,8 @@ class UiSection (UiSectionClassObject):
if self.StringData is not None :
NameString = self.StringData
elif self.FileName is not None:
+ if Dict is None:
+ Dict = {}
FileNameStr = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)
FileNameStr = GenFdsGlobalVariable.MacroExtend(FileNameStr, Dict)
FileObj = open(FileNameStr, 'r')