]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/doxygengen_spec.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Scripts / PackageDocumentTools / plugins / EdkPlugins / edk2 / model / doxygengen_spec.py
index 4bae6968a96e9513b4a0f8c966c5ef1fe7fc6160..3ba4eed55e80243a3280e7b51415686ca4f2ef85 100644 (file)
@@ -5,15 +5,9 @@
 #\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
-# distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
-import plugins.EdkPlugins.basemodel.doxygen as doxygen\r
+from plugins.EdkPlugins.basemodel import doxygen\r
 import os\r
 try:\r
     import wx\r
@@ -21,8 +15,8 @@ try:
 except:\r
     gInGui = False\r
 import re\r
-import plugins.EdkPlugins.edk2.model.inf as inf\r
-import plugins.EdkPlugins.edk2.model.dec as dec\r
+from plugins.EdkPlugins.edk2.model import inf\r
+from plugins.EdkPlugins.edk2.model import dec\r
 from plugins.EdkPlugins.basemodel.message import *\r
 \r
 _ignore_dir = ['.svn', '_svn', 'cvs']\r
@@ -388,7 +382,7 @@ class PackageDocumentAction(DoxygenAction):
         configFile.AddFile(path)\r
         return\r
         no = 0\r
-        for no in xrange(len(lines)):\r
+        for no in range(len(lines)):\r
             if len(lines[no].strip()) == 0:\r
                 continue\r
             if lines[no].strip()[:2] in ['##', '//', '/*', '*/']:\r
@@ -1003,7 +997,7 @@ class PackageDocumentAction(DoxygenAction):
         #file = textfile.TextFile(path)\r
 \r
         try:\r
-            file = open(path, 'rb')\r
+            file = open(path, 'r')\r
         except (IOError, OSError) as msg:\r
             return None\r
 \r