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:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user