summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2018-04-28 06:32:54 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-05-04 13:08:09 +0800
commit8252e6bf2ddfa210992c3590008029933592ad16 (patch)
tree34cc618710565f98d401c2f60b3fa7a6ff9ae2d1 /BaseTools/Source/Python/AutoGen/AutoGen.py
parent4d601fc6b17d69cf20c23cfbaf063bb337b4876d (diff)
downloadedk2-8252e6bf2ddfa210992c3590008029933592ad16.tar.gz
edk2-8252e6bf2ddfa210992c3590008029933592ad16.tar.bz2
edk2-8252e6bf2ddfa210992c3590008029933592ad16.zip
BaseTools: dont make iterator into list if not needed
functions (like join) can use the iterator just as easily. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 18925fdc28..54f6b1f173 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -460,7 +460,7 @@ class WorkspaceAutoGen(AutoGen):
'build',
FORMAT_INVALID,
"Building modules from source INFs, following PCD use %s and %s access method. It must be corrected to use only one access method." % (i, j),
- ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in Intersections])
+ ExtraData="%s" % '\n\t'.join(str(P[1]+'.'+P[0]) for P in Intersections)
)
#
@@ -2295,7 +2295,7 @@ class PlatformAutoGen(AutoGen):
#
for Item in LibraryList:
if ConsumedByList[Item] != [] and Item in Constructor and len(Constructor) > 1:
- ErrorMessage = "\tconsumed by " + "\n\tconsumed by ".join([str(L) for L in ConsumedByList[Item]])
+ ErrorMessage = "\tconsumed by " + "\n\tconsumed by ".join(str(L) for L in ConsumedByList[Item])
EdkLogger.error("build", BUILD_ERROR, 'Library [%s] with constructors has a cycle' % str(Item),
ExtraData=ErrorMessage, File=self.MetaFile)
if Item not in SortedLibraryList:
@@ -2415,7 +2415,7 @@ class PlatformAutoGen(AutoGen):
if Sku.VariableGuid == '': continue
Sku.VariableGuidValue = GuidValue(Sku.VariableGuid, self.PackageList, self.MetaFile.Path)
if Sku.VariableGuidValue is None:
- PackageList = "\n\t".join([str(P) for P in self.PackageList])
+ PackageList = "\n\t".join(str(P) for P in self.PackageList)
EdkLogger.error(
'build',
RESOURCE_NOT_AVAILABLE,
@@ -3122,7 +3122,7 @@ class ModuleAutoGen(AutoGen):
for Depex in DepexList:
for key in Depex:
DepexStr += '[Depex.%s.%s]\n' % key
- DepexStr += '\n'.join(['# '+ val for val in Depex[key]])
+ DepexStr += '\n'.join('# '+ val for val in Depex[key])
DepexStr += '\n\n'
if not DepexStr:
return '[Depex.%s]\n' % self.Arch
@@ -3136,7 +3136,7 @@ class ModuleAutoGen(AutoGen):
DepexStr += ' AND '
DepexStr += '('
for D in Depex.values():
- DepexStr += ' '.join([val for val in D])
+ DepexStr += ' '.join(val for val in D)
Index = DepexStr.find('END')
if Index > -1 and Index == len(DepexStr) - 3:
DepexStr = DepexStr[:-3]