]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
BaseTools: Fix old python2 idioms
[mirror_edk2.git] / BaseTools / Source / Python / UPT / GenMetaFile / GenDecFile.py
index 9397359367e7ae84124f87184f881e712cd15c30..a1a9d38087ee854fb465bf724eb79ce56fbf9525 100644 (file)
@@ -123,8 +123,7 @@ def GenPcd(Package, Content):
         if Pcd.GetSupModuleList():\r
             Statement += GenDecTailComment(Pcd.GetSupModuleList())\r
 \r
-        ArchList = Pcd.GetSupArchList()\r
-        ArchList.sort()\r
+        ArchList = sorted(Pcd.GetSupArchList())\r
         SortedArch = ' '.join(ArchList)\r
         if SortedArch in NewSectionDict:\r
             NewSectionDict[SortedArch] = \\r
@@ -205,8 +204,7 @@ def GenGuidProtocolPpi(Package, Content):
         #\r
         if Guid.GetSupModuleList():\r
             Statement += GenDecTailComment(Guid.GetSupModuleList())     \r
-        ArchList = Guid.GetSupArchList()\r
-        ArchList.sort()\r
+        ArchList = sorted(Guid.GetSupArchList())\r
         SortedArch = ' '.join(ArchList)\r
         if SortedArch in NewSectionDict:\r
             NewSectionDict[SortedArch] = \\r
@@ -246,8 +244,7 @@ def GenGuidProtocolPpi(Package, Content):
         #\r
         if Protocol.GetSupModuleList():\r
             Statement += GenDecTailComment(Protocol.GetSupModuleList())\r
-        ArchList = Protocol.GetSupArchList()\r
-        ArchList.sort()\r
+        ArchList = sorted(Protocol.GetSupArchList())\r
         SortedArch = ' '.join(ArchList)\r
         if SortedArch in NewSectionDict:\r
             NewSectionDict[SortedArch] = \\r
@@ -287,8 +284,7 @@ def GenGuidProtocolPpi(Package, Content):
         #\r
         if Ppi.GetSupModuleList():\r
             Statement += GenDecTailComment(Ppi.GetSupModuleList())\r
-        ArchList = Ppi.GetSupArchList()\r
-        ArchList.sort()\r
+        ArchList = sorted(Ppi.GetSupArchList())\r
         SortedArch = ' '.join(ArchList)\r
         if SortedArch in NewSectionDict:\r
             NewSectionDict[SortedArch] = \\r
@@ -463,8 +459,7 @@ def PackageToDec(Package, DistHeader = None):
         if LibraryClass.GetSupModuleList():\r
             Statement += \\r
             GenDecTailComment(LibraryClass.GetSupModuleList())\r
-        ArchList = LibraryClass.GetSupArchList()\r
-        ArchList.sort()\r
+        ArchList = sorted(LibraryClass.GetSupArchList())\r
         SortedArch = ' '.join(ArchList)\r
         if SortedArch in NewSectionDict:\r
             NewSectionDict[SortedArch] = \\r