Merge pull request #63135 from keslerm/remove-boto-dependency

remove boto dependency from boto3mod
This commit is contained in:
Gareth J. Greenaway 2022-12-06 15:59:57 -08:00 committed by GitHub
commit 21463a2f46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

1
changelog/62672.fixed Normal file
View file

@ -0,0 +1 @@
Fix depenency on legacy boto module in boto3 modules

View file

@ -38,11 +38,10 @@ from salt.exceptions import SaltInvocationError
# pylint: disable=import-error
try:
# pylint: disable=import-error
import boto
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)
@ -202,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 "