提交 1e6eeaf2 编写于 作者: D dengkaipeng

fix python3 compatable.

上级 486bef21
...@@ -298,7 +298,8 @@ def _download(url, path, md5sum=None): ...@@ -298,7 +298,8 @@ def _download(url, path, md5sum=None):
content_md5 = req.headers.get('content-md5') content_md5 = req.headers.get('content-md5')
if not content_md5 or _md5check( if not content_md5 or _md5check(
tmp_fullname, tmp_fullname,
binascii.hexlify(base64.b64decode(content_md5.strip('"')))): binascii.hexlify(base64.b64decode(content_md5.strip(
'"'))).decode()):
shutil.move(tmp_fullname, fullname) shutil.move(tmp_fullname, fullname)
return fullname return fullname
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册