2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00

Fix broken cPython: md5.digest() is not supposed to raise exceptions #2213

This commit is contained in:
Thomas Nagy 2018-12-06 07:44:36 +01:00
parent 753b153631
commit 1c7be35dc0
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA

View File

@ -51,8 +51,14 @@ except ImportError:
try: try:
from hashlib import sha1 as md5 from hashlib import sha1 as md5
except ImportError: except ImportError:
# never fail to enable fixes from another module # never fail to enable potential fixes from another module
pass pass
else:
try:
md5().digest()
except ValueError:
# Fips? #2213
from hashlib import sha1 as md5
try: try:
import threading import threading