diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-10-11 11:20:59 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-13 09:54:07 +0800 |
commit | 86e6cf98a8493574878286522078050ac4dd505d (patch) | |
tree | ca47729eab67c9f90e0dac5a14dc5ca14ef22ef1 /BaseTools/Source/Python/Workspace/MetaFileParser.py | |
parent | a09f4c91f785e36f0987aa3a6d7656ba51e6aeda (diff) | |
download | edk2-86e6cf98a8493574878286522078050ac4dd505d.tar.gz edk2-86e6cf98a8493574878286522078050ac4dd505d.tar.bz2 edk2-86e6cf98a8493574878286522078050ac4dd505d.zip |
BaseTools: Handle the bytes and str difference
Deal with bytes and str is different, remove the unicode()
Using utcfromtimestamp instead of fromtimestamp.
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: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 9f2a3bcb5a..470cfed5b6 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1931,10 +1931,10 @@ class DecParser(MetaFileParser): return
if self._include_flag:
- self._ValueList[1] = "<HeaderFiles>_" + md5(self._CurrentLine).hexdigest()
+ self._ValueList[1] = "<HeaderFiles>_" + md5(self._CurrentLine.encode('utf-8')).hexdigest()
self._ValueList[2] = self._CurrentLine
if self._package_flag and "}" != self._CurrentLine:
- self._ValueList[1] = "<Packages>_" + md5(self._CurrentLine).hexdigest()
+ self._ValueList[1] = "<Packages>_" + md5(self._CurrentLine.encode('utf-8')).hexdigest()
self._ValueList[2] = self._CurrentLine
if self._CurrentLine == "}":
self._package_flag = False
|