BaseTools: do the list and iterator translation
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
86e6cf98a8
commit
00fcce9153
@ -98,7 +98,7 @@ def GetSplitValueList(String, SplitTag=DataType.TAB_VALUE_SPLIT, MaxSplit= -1):
|
||||
# @retval list() A list for splitted string
|
||||
#
|
||||
def GetSplitList(String, SplitStr=DataType.TAB_VALUE_SPLIT, MaxSplit= -1):
|
||||
return map(lambda l: l.strip(), String.split(SplitStr, MaxSplit))
|
||||
return list(map(lambda l: l.strip(), String.split(SplitStr, MaxSplit)))
|
||||
|
||||
## MergeArches
|
||||
#
|
||||
@ -544,7 +544,7 @@ def GetSingleValueOfKeyFromLines(Lines, Dictionary, CommentCharacter, KeySplitCh
|
||||
#
|
||||
LineList[1] = CleanString(LineList[1], CommentCharacter)
|
||||
if ValueSplitFlag:
|
||||
Value = map(string.strip, LineList[1].split(ValueSplitCharacter))
|
||||
Value = list(map(string.strip, LineList[1].split(ValueSplitCharacter)))
|
||||
else:
|
||||
Value = CleanString(LineList[1], CommentCharacter).splitlines()
|
||||
|
||||
@ -750,7 +750,7 @@ def SplitString(String):
|
||||
# @param StringList: A list for strings to be converted
|
||||
#
|
||||
def ConvertToSqlString(StringList):
|
||||
return map(lambda s: s.replace("'", "''"), StringList)
|
||||
return list(map(lambda s: s.replace("'", "''"), StringList))
|
||||
|
||||
## Convert To Sql String
|
||||
#
|
||||
|
Reference in New Issue
Block a user