mirror of https://github.com/celery/kombu.git
Fix tests when sqs_extended_client is not installed
The try/except block was triggering when sqs_extended_client isn't installed, which results in boto being overwritten with None
This commit is contained in:
parent
e81d5da536
commit
2d1f6919fc
|
@ -4,14 +4,12 @@ from __future__ import annotations
|
|||
|
||||
try:
|
||||
import boto3
|
||||
import sqs_extended_client
|
||||
from botocore import exceptions
|
||||
from botocore.awsrequest import AWSRequest
|
||||
from botocore.httpsession import get_cert_path
|
||||
from botocore.response import get_response
|
||||
except ImportError:
|
||||
boto3 = None
|
||||
sqs_extended_client = None
|
||||
|
||||
class _void:
|
||||
pass
|
||||
|
@ -24,6 +22,11 @@ except ImportError:
|
|||
get_response = _void()
|
||||
get_cert_path = _void()
|
||||
|
||||
try:
|
||||
import sqs_extended_client
|
||||
except ImportError:
|
||||
sqs_extended_client = None
|
||||
|
||||
|
||||
__all__ = (
|
||||
'exceptions', 'AWSRequest', 'get_response', 'get_cert_path',
|
||||
|
|
|
@ -5,7 +5,10 @@ from __future__ import annotations
|
|||
|
||||
try:
|
||||
import boto3
|
||||
import sqs_extended_client
|
||||
except ImportError:
|
||||
boto3 = None
|
||||
|
||||
try:
|
||||
import sqs_extended_client
|
||||
except ImportError:
|
||||
sqs_extended_client = None
|
||||
|
|
Loading…
Reference in New Issue