make this function @staticmethod since self parameter is not used. change valuelist to valuedict since it is a dictionary.
Cc: Liming Gao <[email protected]> Cc: Yonghong Zhu <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <[email protected]> --- BaseTools/Source/Python/AutoGen/GenVar.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools/Source/Python/AutoGen/GenVar.py index 13bcf99b2627..b8f40da9a39c 100644 --- a/BaseTools/Source/Python/AutoGen/GenVar.py +++ b/BaseTools/Source/Python/AutoGen/GenVar.py @@ -113,9 +113,10 @@ class VariableMgr(object): indexedvarinfo[key] = [var_info(n.pcdindex,n.pcdname,n.defaultstoragename,n.skuname,n.var_name, n.var_guid, "0x00",n.var_attribute,newvaluestr , newvaluestr , DataType.TAB_VOID)] self.VarInfo = [item[0] for item in indexedvarinfo.values()] - def assemble_variable(self, valuelist): - ordered_offset = sorted(valuelist.keys()) - ordered_value = [valuelist[k] for k in ordered_offset] + @staticmethod + def assemble_variable(valuedict): + ordered_offset = sorted(valuedict.keys()) + ordered_value = [valuedict[k] for k in ordered_offset] var_value = [] num = 0 for offset in ordered_offset: @@ -126,6 +127,7 @@ class VariableMgr(object): var_value += ordered_value[num] num +=1 return var_value + def process_variable_data(self): var_data = collections.defaultdict(collections.OrderedDict) -- 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

