diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index b063f064fb..6a22d01012 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -2139,6 +2139,8 @@ def PackByteFormatGUID(Guid): # def CopyDict(ori_dict): dict_type = ori_dict.__class__ + if dict_type not in (dict,OrderedDict): + return ori_dict new_dict = dict_type() for key in ori_dict: if isinstance(ori_dict[key],(dict,OrderedDict)): diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index b485c75a84..4543ae7dc0 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -974,7 +974,7 @@ class DscBuildData(PlatformBuildClassObject): if TAB_DEFAULT_STORES_DEFAULT not in skuobj.DefaultStoreDict: PcdDefaultStoreSet = set(defaultstorename for defaultstorename in skuobj.DefaultStoreDict) mindefaultstorename = DefaultStoreMgr.GetMin(PcdDefaultStoreSet) - skuobj.DefaultStoreDict[TAB_DEFAULT_STORES_DEFAULT] = CopyDict(skuobj.DefaultStoreDict[mindefaultstorename]) + skuobj.DefaultStoreDict[TAB_DEFAULT_STORES_DEFAULT] = skuobj.DefaultStoreDict[mindefaultstorename] return Pcds def RecoverCommandLinePcd(self): @@ -2769,7 +2769,7 @@ class DscBuildData(PlatformBuildClassObject): mindefaultstorename = DefaultStoreObj.GetMin(set(defaultstorename for defaultstorename in skuobj.DefaultStoreDict)) for defaultstorename in DefaultStores: if defaultstorename not in skuobj.DefaultStoreDict: - skuobj.DefaultStoreDict[defaultstorename] = CopyDict(skuobj.DefaultStoreDict[mindefaultstorename]) + skuobj.DefaultStoreDict[defaultstorename] = skuobj.DefaultStoreDict[mindefaultstorename] skuobj.HiiDefaultValue = skuobj.DefaultStoreDict[mindefaultstorename] for skuname, skuid in SkuIds.items(): if skuname not in PcdObj.SkuInfoList: