]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Scripts/PackageDocumentTools/packagedocapp.pyw
BaseTools/Scripts: Porting PackageDocumentTools code to use Python3
[mirror_edk2.git] / BaseTools / Scripts / PackageDocumentTools / packagedocapp.pyw
index 28f6f9bf5cceaf941ee0feb46a187349c48e7e9b..2998db3915fa77a40c15318bacca2a118d26499f 100644 (file)
@@ -18,8 +18,8 @@ import os, sys, wx, logging
 import wx.stc\r
 import wx.lib.newevent\r
 import wx.lib.agw.genericmessagedialog as GMD\r
-import plugins.EdkPlugins.edk2.model.baseobject as baseobject\r
-import plugins.EdkPlugins.edk2.model.doxygengen as doxygengen\r
+from plugins.EdkPlugins.edk2.model import baseobject\r
+from plugins.EdkPlugins.edk2.model import doxygengen\r
 \r
 if hasattr(sys, "frozen"):\r
     appPath = os.path.abspath(os.path.dirname(sys.executable))\r
@@ -720,7 +720,7 @@ class ProgressDialog(wx.Dialog):
             lines = f.readlines()\r
             f.close()\r
             bfound = False\r
-            for index in xrange(len(lines)):\r
+            for index in range(len(lines)):\r
                 if lines[index].find('<a class="el" href="files.html" target="basefrm">File List</a>') != -1:\r
                     lines[index] = "<!-- %s" % lines[index]\r
                     bfound = True\r
@@ -969,7 +969,7 @@ class ProgressDialog(wx.Dialog):
             fd = open(path, 'r')\r
             text = fd.read()\r
             fd.close()\r
-        except Exception, e:\r
+        except Exception as e:\r
             self.LogMessage ("   <<<Fail to open file %s" % path)\r
             return\r
         text = text.replace ('.s.dox', '.s')\r
@@ -982,7 +982,7 @@ class ProgressDialog(wx.Dialog):
             fd = open(path, 'w')\r
             fd.write(text)\r
             fd.close()\r
-        except Exception, e:\r
+        except Exception as e:\r
             self.LogMessage ("    <<<Fail to fixup file %s" % path)\r
             return\r
         self.LogMessage('    >>> Finish to fixup .dox postfix for file %s \n' % path)\r
@@ -993,7 +993,7 @@ class ProgressDialog(wx.Dialog):
             fd = open(path, 'r')\r
             lines = fd.readlines()\r
             fd.close()\r
-        except Exception, e:\r
+        except Exception as e:\r
             self.LogMessage ("   <<<Fail to open file %s" % path)\r
             return\r
         for line in lines:\r
@@ -1004,7 +1004,7 @@ class ProgressDialog(wx.Dialog):
             fd = open(path, 'w')\r
             fd.write("".join(lines))\r
             fd.close()\r
-        except Exception, e:\r
+        except Exception as e:\r
             self.LogMessage ("    <<<Fail to fixup file %s" % path)\r
             return\r
         self.LogMessage('    >>> Finish to fixup .decdoxygen postfix for file %s \n' % path)\r