]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools: dont make iterator into list if not needed
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / AutoGen.py
index 18925fdc289602acdefc1917c08e0165b7f0e1fb..54f6b1f173b2a237d79061bc1bd2ae9cce259012 100644 (file)
@@ -460,7 +460,7 @@ class WorkspaceAutoGen(AutoGen):
                             'build',\r
                             FORMAT_INVALID,\r
                             "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),\r
-                            ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in Intersections])\r
+                            ExtraData="%s" % '\n\t'.join(str(P[1]+'.'+P[0]) for P in Intersections)\r
                             )\r
 \r
             #\r
@@ -2295,7 +2295,7 @@ class PlatformAutoGen(AutoGen):
         #\r
         for Item in LibraryList:\r
             if ConsumedByList[Item] != [] and Item in Constructor and len(Constructor) > 1:\r
-                ErrorMessage = "\tconsumed by " + "\n\tconsumed by ".join([str(L) for L in ConsumedByList[Item]])\r
+                ErrorMessage = "\tconsumed by " + "\n\tconsumed by ".join(str(L) for L in ConsumedByList[Item])\r
                 EdkLogger.error("build", BUILD_ERROR, 'Library [%s] with constructors has a cycle' % str(Item),\r
                                 ExtraData=ErrorMessage, File=self.MetaFile)\r
             if Item not in SortedLibraryList:\r
@@ -2415,7 +2415,7 @@ class PlatformAutoGen(AutoGen):
                 if Sku.VariableGuid == '': continue\r
                 Sku.VariableGuidValue = GuidValue(Sku.VariableGuid, self.PackageList, self.MetaFile.Path)\r
                 if Sku.VariableGuidValue is None:\r
-                    PackageList = "\n\t".join([str(P) for P in self.PackageList])\r
+                    PackageList = "\n\t".join(str(P) for P in self.PackageList)\r
                     EdkLogger.error(\r
                                 'build',\r
                                 RESOURCE_NOT_AVAILABLE,\r
@@ -3122,7 +3122,7 @@ class ModuleAutoGen(AutoGen):
             for Depex in DepexList:\r
                 for key in Depex:\r
                     DepexStr += '[Depex.%s.%s]\n' % key\r
-                    DepexStr += '\n'.join(['# '+ val for val in Depex[key]])\r
+                    DepexStr += '\n'.join('# '+ val for val in Depex[key])\r
                     DepexStr += '\n\n'\r
             if not DepexStr:\r
                 return '[Depex.%s]\n' % self.Arch\r
@@ -3136,7 +3136,7 @@ class ModuleAutoGen(AutoGen):
                 DepexStr += ' AND '\r
             DepexStr += '('\r
             for D in Depex.values():\r
-                DepexStr += ' '.join([val for val in D])\r
+                DepexStr += ' '.join(val for val in D)\r
             Index = DepexStr.find('END')\r
             if Index > -1 and Index == len(DepexStr) - 3:\r
                 DepexStr = DepexStr[:-3]\r