diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2018-04-28 06:32:54 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-05-04 13:08:09 +0800 |
commit | 8252e6bf2ddfa210992c3590008029933592ad16 (patch) | |
tree | 34cc618710565f98d401c2f60b3fa7a6ff9ae2d1 /BaseTools/Source/Python/Workspace/InfBuildData.py | |
parent | 4d601fc6b17d69cf20c23cfbaf063bb337b4876d (diff) | |
download | edk2-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/Workspace/InfBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/InfBuildData.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py index 602746de32..bd1c841541 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -698,7 +698,7 @@ class InfBuildData(ModuleBuildClassObject): CName = Record[0]
Value = ProtocolValue(CName, self.Packages, self.MetaFile.Path)
if Value is None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
+ PackageList = "\n\t".join(str(P) for P in self.Packages)
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
"Value of Protocol [%s] is not found under [Protocols] section in" % CName,
ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
@@ -723,7 +723,7 @@ class InfBuildData(ModuleBuildClassObject): CName = Record[0]
Value = PpiValue(CName, self.Packages, self.MetaFile.Path)
if Value is None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
+ PackageList = "\n\t".join(str(P) for P in self.Packages)
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
"Value of PPI [%s] is not found under [Ppis] section in " % CName,
ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
@@ -748,7 +748,7 @@ class InfBuildData(ModuleBuildClassObject): CName = Record[0]
Value = GuidValue(CName, self.Packages, self.MetaFile.Path)
if Value is None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
+ PackageList = "\n\t".join(str(P) for P in self.Packages)
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
"Value of Guid [%s] is not found under [Guids] section in" % CName,
ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
@@ -918,7 +918,7 @@ class InfBuildData(ModuleBuildClassObject): if Value is None:
Value = GuidValue(Token, self.Packages, self.MetaFile.Path)
if Value is None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
+ PackageList = "\n\t".join(str(P) for P in self.Packages)
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
"Value of [%s] is not found in" % Token,
ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
@@ -961,7 +961,7 @@ class InfBuildData(ModuleBuildClassObject): if TokenSpaceGuid not in self.Guids:
Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path)
if Value is None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
+ PackageList = "\n\t".join(str(P) for P in self.Packages)
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
"Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,
ExtraData=PackageList, File=self.MetaFile, Line=LineNo)
@@ -1131,7 +1131,7 @@ class InfBuildData(ModuleBuildClassObject): FORMAT_INVALID,
"PCD [%s.%s] in [%s] is not found in dependent packages:" % (TokenSpaceGuid, PcdRealName, self.MetaFile),
File=self.MetaFile, Line=LineNo,
- ExtraData="\t%s" % '\n\t'.join([str(P) for P in self.Packages])
+ ExtraData="\t%s" % '\n\t'.join(str(P) for P in self.Packages)
)
Pcds[PcdCName, TokenSpaceGuid] = Pcd
|