]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
BaseTools/UPT:merge UPT Tool use Python2 and Python3
[mirror_edk2.git] / BaseTools / Source / Python / UPT / GenMetaFile / GenInfFile.py
index c2a240a88410c965715c9b6a4958abab315f432d..1f8b3f163e881c30be742a6959885b9ba34ed4ec 100644 (file)
@@ -274,7 +274,7 @@ def GenDefines(ModuleObject):
         if not DefinesDict:\r
             continue\r
         for Statement in DefinesDict:\r
-            if Statement.split(DT.TAB_EQUAL_SPLIT) > 1:\r
+            if len(Statement.split(DT.TAB_EQUAL_SPLIT)) > 1:\r
                 Statement = (u'%s ' % Statement.split(DT.TAB_EQUAL_SPLIT, 1)[0]).ljust(LeftOffset) \\r
                              + u'= %s' % Statement.split(DT.TAB_EQUAL_SPLIT, 1)[1].lstrip()\r
             SortedArch = DT.TAB_ARCH_COMMON\r
@@ -409,7 +409,7 @@ def GenLibraryClasses(ModuleObject):
                 Statement += '|' + FFE\r
             ModuleList = LibraryClass.GetSupModuleList()\r
             ArchList = LibraryClass.GetSupArchList()\r
-            for Index in xrange(0, len(ArchList)):\r
+            for Index in range(0, len(ArchList)):\r
                 ArchList[Index] = ConvertArchForInstall(ArchList[Index])\r
             ArchList.sort()\r
             SortedArch = ' '.join(ArchList)\r
@@ -572,7 +572,7 @@ def GenUserExtensions(ModuleObject):
 #         if not Statement:\r
 #             continue\r
         ArchList = UserExtension.GetSupArchList()\r
-        for Index in xrange(0, len(ArchList)):\r
+        for Index in range(0, len(ArchList)):\r
             ArchList[Index] = ConvertArchForInstall(ArchList[Index])\r
         ArchList.sort()\r
         KeyList = []\r