diff options
author | Fan, ZhijuX <zhijux.fan@intel.com> | 2019-09-12 16:18:27 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-09-17 10:18:51 +0800 |
commit | e32f7bc96dc8db7af0c1c532e4990c9a36a12354 (patch) | |
tree | 501408aa16702eec58fdebdee5c845317c5f9089 /BaseTools/Source/Python/GenFds/FfsFileStatement.py | |
parent | b67735a7e8e962b74120bad956d9a0734f784472 (diff) | |
download | edk2-e32f7bc96dc8db7af0c1c532e4990c9a36a12354.tar.gz edk2-e32f7bc96dc8db7af0c1c532e4990c9a36a12354.tar.bz2 edk2-e32f7bc96dc8db7af0c1c532e4990c9a36a12354.zip |
BaseTools:change some incorrect parameter defaults
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1858
for Dict={},There are pitfalls in the way this default parameter is set
and Dict is not used in functions, other functions have these two cases,
I will change some incorrect parameter defaults
This patch is going to fix this issue
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FfsFileStatement.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FfsFileStatement.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py index 9250361d14..9fb62b0a91 100644 --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py @@ -48,7 +48,7 @@ class FileStatement (FileStatementClassObject): # @param FvParentAddr Parent Fv base address
# @retval string Generated FFS file name
#
- def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None, IsMakefile=False, FvName=None):
+ def GenFfs(self, Dict = None, FvChildAddr=[], FvParentAddr=None, IsMakefile=False, FvName=None):
if self.NameGuid and self.NameGuid.startswith('PCD('):
PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
@@ -70,6 +70,9 @@ class FileStatement (FileStatementClassObject): if not os.path.exists(OutputDir):
os.makedirs(OutputDir)
+ if Dict is None:
+ Dict = {}
+
Dict.update(self.DefineVarDict)
SectionAlignments = None
if self.FvName:
|