]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py
BaseTools: Fix old python2 idioms
[mirror_edk2.git] / BaseTools / Source / Python / UPT / PomAdapter / InfPomAlignmentMisc.py
index cca70e5640428efee922907b21fab847f6ed7e4b..3bb506bea660a92ca4e301a530597ad5eeb5bb15 100644 (file)
@@ -1,7 +1,7 @@
 ## @file InfPomAlignmentMisc.py\r
 # This file contained the routines for InfPomAlignment\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -24,7 +24,7 @@ from Library import DataType as DT
 from Library.Misc import ConvertArchList\r
 from Object.POM.ModuleObject import BinaryFileObject\r
 from Object.POM import CommonObject\r
-from Library.String import FORMAT_INVALID\r
+from Library.StringUtils import FORMAT_INVALID\r
 from Library.Misc import CheckGuidRegFormat\r
 from Logger import StringTable as ST\r
 \r
@@ -194,8 +194,7 @@ def GenBinaryData(BinaryData, BinaryObj, BinariesDict, AsBuildIns, BinaryFileObj
         # can be used for the attribute.\r
         # If both not have VALID_ARCHITECTURE comment and no architecturie specified, then keep it empty.\r
         #        \r
-        SupArchList = ConvertArchList(ItemObj.GetSupArchList())\r
-        SupArchList.sort()\r
+        SupArchList = sorted(ConvertArchList(ItemObj.GetSupArchList()))\r
         if len(SupArchList) == 1 and SupArchList[0] == 'COMMON':\r
             if not (len(OriSupArchList) == 1 or OriSupArchList[0] == 'COMMON'):\r
                 SupArchList = OriSupArchList\r