summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/GenMake.py
diff options
context:
space:
mode:
authorFan, ZhijuX <zhijux.fan@intel.com>2019-09-12 16:18:27 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-09-17 10:18:51 +0800
commite32f7bc96dc8db7af0c1c532e4990c9a36a12354 (patch)
tree501408aa16702eec58fdebdee5c845317c5f9089 /BaseTools/Source/Python/AutoGen/GenMake.py
parentb67735a7e8e962b74120bad956d9a0734f784472 (diff)
downloadedk2-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/AutoGen/GenMake.py')
-rwxr-xr-xBaseTools/Source/Python/AutoGen/GenMake.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index 4f85a93055..3185ebe368 100755
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -205,10 +205,12 @@ class BuildFile(object):
def GetRemoveDirectoryCommand(self, DirList):
return [self._RD_TEMPLATE_[self._FileType] % {'dir':Dir} for Dir in DirList]
- def PlaceMacro(self, Path, MacroDefinitions={}):
+ def PlaceMacro(self, Path, MacroDefinitions=None):
if Path.startswith("$("):
return Path
else:
+ if MacroDefinitions is None:
+ MacroDefinitions = {}
PathLength = len(Path)
for MacroName in MacroDefinitions:
MacroValue = MacroDefinitions[MacroName]
@@ -1762,4 +1764,4 @@ def GetDependencyList(AutoGenObject, FileCache, File, ForceList, SearchPathList)
# This acts like the main() function for the script, unless it is 'import'ed into another script.
if __name__ == '__main__':
- pass \ No newline at end of file
+ pass