mirror of https://github.com/acidanthera/audk.git
BaseTools:Run packagedoc_cli.py to generate doc failed
The reason for this problem is that the file was opened incorrectly. 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:
parent
c3947b5423
commit
8ef3a6ec1f
|
@ -376,9 +376,10 @@ class PackageDocumentAction(DoxygenAction):
|
|||
return
|
||||
|
||||
try:
|
||||
f = open(path, 'r')
|
||||
lines = f.readlines()
|
||||
f.close()
|
||||
with open(path, 'r') as f:
|
||||
lines = f.readlines()
|
||||
except UnicodeDecodeError:
|
||||
return
|
||||
except IOError:
|
||||
ErrorMsg('Fail to open file %s' % path)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue