From e32f7bc96dc8db7af0c1c532e4990c9a36a12354 Mon Sep 17 00:00:00 2001 From: "Fan, ZhijuX" Date: Thu, 12 Sep 2019 16:18:27 +0800 Subject: 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 Cc: Bob Feng Signed-off-by: Zhiju.Fan Reviewed-by: Bob Feng --- BaseTools/Source/Python/Common/RangeExpression.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Common/RangeExpression.py') diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/Source/Python/Common/RangeExpression.py index e9296e03f6..039d281467 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -342,7 +342,9 @@ class RangeExpression(BaseExpression): raise BadExpression(ERR_STRING_EXPR % Operator) - def __init__(self, Expression, PcdDataType, SymbolTable = {}): + def __init__(self, Expression, PcdDataType, SymbolTable = None): + if SymbolTable is None: + SymbolTable = {} super(RangeExpression, self).__init__(self, Expression, PcdDataType, SymbolTable) self._NoProcess = False if not isinstance(Expression, type('')): -- cgit v1.2.3