Catch ImportError for users of paramiko<2.0.0
This PR prevents users of paramiko<2.0.0 from running into an ImportError while trying to import the cryptography library. This comes with no functional changes and should remediate any ImportError's users of paramiko<2.0.0 would be getting. Change-Id: I6c45bdbf288c4cef5d5e5fb055276d9d3978e8b8
This commit is contained in:
parent
837db9e29c
commit
18005e276d
|
@ -30,8 +30,12 @@ from cafe.engine.sshv2.models import ExecResponse
|
||||||
py3compat.u("")
|
py3compat.u("")
|
||||||
|
|
||||||
# dirty hack 2.0 also issue 104
|
# dirty hack 2.0 also issue 104
|
||||||
from cryptography.hazmat.backends import default_backend
|
# Try / Catch to prevent users using paramiko<2.0.0 from raising an ImportError
|
||||||
default_backend()
|
try:
|
||||||
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
default_backend()
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ProxyTypes(object):
|
class ProxyTypes(object):
|
||||||
|
|
Loading…
Reference in New Issue