]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/Report.py
BaseTools/EOT: Change to call a program instead of calling Python API.
[mirror_edk2.git] / BaseTools / Source / Python / Eot / Report.py
index 7435b4d7c9308cde8fb3c0d1441874eea97f9e5f..01ad86ad3ee831e5a988c7b00291ba7002dfcb3e 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create report for Eot tool\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -14,8 +14,9 @@
 ##\r
 # Import Modules\r
 #\r
+from __future__ import absolute_import\r
 import Common.LongFilePathOs as os\r
-import EotGlobalData\r
+from . import EotGlobalData\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## Report() class\r
@@ -76,7 +77,7 @@ class Report(object):
     def GenerateUnDispatchedList(self):\r
         FvObj = self.FvObj\r
         EotGlobalData.gOP_UN_DISPATCHED.write('%s\n' % FvObj.Name)\r
-        for Item in FvObj.UnDispatchedFfsDict:\r
+        for Item in FvObj.UnDispatchedFfsDict.keys():\r
             EotGlobalData.gOP_UN_DISPATCHED.write('%s\n' % FvObj.UnDispatchedFfsDict[Item])\r
 \r
     ## GenerateFv() method\r
@@ -111,7 +112,7 @@ class Report(object):
         self.WriteLn(Content)\r
 \r
         EotGlobalData.gOP_DISPATCH_ORDER.write('Dispatched:\n')\r
-        for FfsId in FvObj.OrderedFfsDict:\r
+        for FfsId in FvObj.OrderedFfsDict.keys():\r
             self.GenerateFfs(FvObj.OrderedFfsDict[FfsId])\r
         Content = """     </table></td>\r
   </tr>"""\r
@@ -124,7 +125,7 @@ class Report(object):
         self.WriteLn(Content)\r
 \r
         EotGlobalData.gOP_DISPATCH_ORDER.write('\nUnDispatched:\n')\r
-        for FfsId in FvObj.UnDispatchedFfsDict:\r
+        for FfsId in FvObj.UnDispatchedFfsDict.keys():\r
             self.GenerateFfs(FvObj.UnDispatchedFfsDict[FfsId])\r
         Content = """     </table></td>\r
   </tr>"""\r
@@ -276,13 +277,13 @@ class Report(object):
       </tr>\r
       <tr id='Ffs%s' style='display:none;'>\r
         <td colspan="4"><table width="100%%"  border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, FfsPath, FfsName, FfsGuid, FfsOffset, FfsType, self.FfsIndex)\r
-            \r
+\r
             if self.DispatchList:\r
                 if FfsObj.Type in [0x04, 0x06]:\r
                     self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "P", FfsName, FfsPath))\r
                 if FfsObj.Type in [0x05, 0x07, 0x08, 0x0A]:\r
                     self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "D", FfsName, FfsPath))\r
-               \r
+\r
             self.WriteLn(Content)\r
 \r
             EotGlobalData.gOP_DISPATCH_ORDER.write('%s\n' %FfsName)\r