From fcb1af1b69f8c491824aaa589c7693fa6e731e0b Mon Sep 17 00:00:00 2001 From: "Feng, YunhuaX" Date: Wed, 8 Aug 2018 14:56:55 +0800 Subject: BaseTools: Use hashlib instead of md5 Use from hashlib import md5 instead of import md5 due to md5 deprecated in python3 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py') diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 2b1ab40439..7bfe0933a1 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -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] = "_" + md5.new(self._CurrentLine).hexdigest() + self._ValueList[1] = "_" + md5(self._CurrentLine).hexdigest() self._ValueList[2] = self._CurrentLine if self._package_flag and "}" != self._CurrentLine: - self._ValueList[1] = "_" + md5.new(self._CurrentLine).hexdigest() + self._ValueList[1] = "_" + md5(self._CurrentLine).hexdigest() self._ValueList[2] = self._CurrentLine if self._CurrentLine == "}": self._package_flag = False -- cgit v1.2.3