mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Merge pull request #63135 from keslerm/remove-boto-dependency
remove boto dependency from boto3mod
This commit is contained in:
commit
21463a2f46
2 changed files with 3 additions and 3 deletions
1
changelog/62672.fixed
Normal file
1
changelog/62672.fixed
Normal file
|
@ -0,0 +1 @@
|
|||
Fix depenency on legacy boto module in boto3 modules
|
|
@ -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 "
|
||||
|
|
Loading…
Add table
Reference in a new issue