Wrap botocore patching in tyr/except since we do not require it to be installed.
This commit is contained in:
parent
2e27e9edfb
commit
75a40e4571
@ -33,7 +33,11 @@ from .route53 import mock_route53 # flake8: noqa
|
|||||||
from .swf import mock_swf # flake8: noqa
|
from .swf import mock_swf # flake8: noqa
|
||||||
|
|
||||||
|
|
||||||
# Need to monkey-patch botocore requests back to underlying urllib3 classes
|
try:
|
||||||
from botocore.awsrequest import HTTPSConnectionPool, HTTPConnectionPool, HTTPConnection, VerifiedHTTPSConnection
|
# Need to monkey-patch botocore requests back to underlying urllib3 classes
|
||||||
HTTPSConnectionPool.ConnectionCls = VerifiedHTTPSConnection
|
from botocore.awsrequest import HTTPSConnectionPool, HTTPConnectionPool, HTTPConnection, VerifiedHTTPSConnection
|
||||||
HTTPConnectionPool.ConnectionCls = HTTPConnection
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
HTTPSConnectionPool.ConnectionCls = VerifiedHTTPSConnection
|
||||||
|
HTTPConnectionPool.ConnectionCls = HTTPConnection
|
||||||
|
Loading…
Reference in New Issue
Block a user