replace boto.exceptions with botocore.exceptions

This commit is contained in:
rridley 2022-12-02 09:45:49 -05:00
parent 1710353427
commit 23b53b2d84
No known key found for this signature in database
GPG key ID: 955CC2652C6C6FB9

View file

@ -40,8 +40,8 @@ try:
# pylint: disable=import-error
import boto3
import boto3.session
import boto.exception
import botocore # pylint: disable=W0611
import botocore.exceptions
# pylint: enable=import-error
logging.getLogger("boto3").setLevel(logging.CRITICAL)
@ -201,7 +201,7 @@ def get_connection(
conn = session.client(module)
if conn is None:
raise SaltInvocationError('Region "{}" is not valid.'.format(region))
except boto.exception.NoAuthHandlerFound:
except botocore.exceptions.NoCredentialsError:
raise SaltInvocationError(
"No authentication credentials found when "
"attempting to make boto {} connection to "