From 87e1c3bf563a57800e20ad9ca90d919f500d202d Mon Sep 17 00:00:00 2001 From: dengkaipeng Date: Fri, 28 Aug 2020 08:11:26 +0000 Subject: [PATCH] fix python3 compatable. --- ppdet/utils/download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppdet/utils/download.py b/ppdet/utils/download.py index 5697e14b6..9f08d8aa3 100644 --- a/ppdet/utils/download.py +++ b/ppdet/utils/download.py @@ -298,7 +298,8 @@ def _download(url, path, md5sum=None): content_md5 = req.headers.get('content-md5') if not content_md5 or _md5check( tmp_fullname, - binascii.hexlify(base64.b64decode(content_md5.strip('"')))): + binascii.hexlify(base64.b64decode(content_md5.strip( + '"'))).decode()): shutil.move(tmp_fullname, fullname) return fullname else: -- GitLab