summaryrefslogtreecommitdiff
path: root/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py')
-rw-r--r--BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py b/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py
index d1e21135cf..4b3303c658 100644
--- a/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py
+++ b/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py
@@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
-from __future__ import print_function
-from __future__ import absolute_import
import os
from .message import *
@@ -67,7 +65,7 @@ class Page(BaseDoxygeItem):
def AddSection(self, section):
self.mSections.append(section)
- self.mSections.sort(cmp=lambda x, y: cmp(x.mName.lower(), y.mName.lower()))
+ self.mSections.sort(key=lambda x: x.mName.lower())
def Generate(self):
if self.mIsMainPage:
@@ -80,7 +78,7 @@ class Page(BaseDoxygeItem):
self.mText.append(self.mDescription)
endIndex = len(self.mText)
- self.mSections.sort()
+ self.mSections.sort(key=lambda x: x.mName.lower())
for sect in self.mSections:
self.mText += sect.Generate()
@@ -92,7 +90,7 @@ class Page(BaseDoxygeItem):
self.mText.insert(endIndex, '<ul>')
endIndex += 1
if self.mIsSort:
- self.mSubPages.sort(cmp=lambda x, y: cmp(x.mName.lower(), y.mName.lower()))
+ self.mSubPages.sort(key=lambda x: x.mName.lower())
for page in self.mSubPages:
self.mText.insert(endIndex, '<li>\subpage %s \"%s\" </li>' % (page.mTag, page.mName))
endIndex += 1