]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/Report.py
BaseTools: Use absolute import in Eot
[mirror_edk2.git] / BaseTools / Source / Python / Eot / Report.py
index 024f6d87bea3b86c1a424595889814ebcc1b6839..4ddddb1034013670bafb10ee78c095c45a285475 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create report for Eot tool\r
 #\r
-# Copyright (c) 2008 - 2010, 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
 ##\r
 # Import Modules\r
 #\r
-import os\r
-import EotGlobalData\r
+from __future__ import absolute_import\r
+import Common.LongFilePathOs as os\r
+from . import EotGlobalData\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## Report() class\r
 #\r
@@ -233,7 +235,7 @@ class Report(object):
     #\r
     def GenerateFfs(self, FfsObj):\r
         self.FfsIndex = self.FfsIndex + 1\r
-        if FfsObj != None and FfsObj.Type in [0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0xA]:\r
+        if FfsObj is not None and FfsObj.Type in [0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0xA]:\r
             FfsGuid = FfsObj.Guid\r
             FfsOffset = FfsObj._OFF_\r
             FfsName = 'Unknown-Module'\r
@@ -275,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