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:
parent
753b153631
commit
1c7be35dc0
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user