BaseTools:PackageDocumentTools import lib error occurs.

Steps:
 1. Download edk2 tree
 2. Build BaseTools
 3. Go to edk2\BaseTools\Scripts\PackageDocumentTools
    to run packagedoc_cli.py

An error occurs if relative imports are used when running
a file alone

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Fan, ZhijuX
2019-02-25 13:13:20 +08:00
committed by Feng, Bob C
parent dc082d5029
commit 9ab4ec5188
9 changed files with 26 additions and 26 deletions

View File

@ -92,7 +92,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