mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
replace boto.exceptions with botocore.exceptions
This commit is contained in:
parent
1710353427
commit
23b53b2d84
1 changed files with 2 additions and 2 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Reference in a new issue