Commit 6740a1f3 by James Tanner

Wrap crypto.hash imports with try/except

parent 0f962dba
......@@ -30,7 +30,11 @@ from binascii import hexlify
from binascii import unhexlify
from ansible import constants as C
from Crypto.Hash import SHA256, HMAC
try:
from Crypto.Hash import SHA256, HMAC
HAS_HASH = True
except ImportError:
HAS_HASH = False
# Counter import fails for 2.0.1, requires >= 2.6.1 from pip
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment