BaseTools: Use hashlib instead of md5
Use from hashlib import md5 instead of import md5 due to md5 deprecated in python3 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
87010d3d02
commit
fcb1af1b69
@ -21,7 +21,7 @@ import Common.LongFilePathOs as os
|
||||
import re
|
||||
import time
|
||||
import copy
|
||||
import md5
|
||||
from hashlib import md5
|
||||
|
||||
import Common.EdkLogger as EdkLogger
|
||||
import Common.GlobalData as GlobalData
|
||||
@ -1929,10 +1929,10 @@ class DecParser(MetaFileParser):
|
||||
return
|
||||
|
||||
if self._include_flag:
|
||||
self._ValueList[1] = "<HeaderFiles>_" + md5.new(self._CurrentLine).hexdigest()
|
||||
self._ValueList[1] = "<HeaderFiles>_" + md5(self._CurrentLine).hexdigest()
|
||||
self._ValueList[2] = self._CurrentLine
|
||||
if self._package_flag and "}" != self._CurrentLine:
|
||||
self._ValueList[1] = "<Packages>_" + md5.new(self._CurrentLine).hexdigest()
|
||||
self._ValueList[1] = "<Packages>_" + md5(self._CurrentLine).hexdigest()
|
||||
self._ValueList[2] = self._CurrentLine
|
||||
if self._CurrentLine == "}":
|
||||
self._package_flag = False
|
||||
|
Reference in New Issue
Block a user