mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 05:19:09 -07:00
Fixing error exception handling for python3. Does not need to be compa… (#3840)
* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above. * Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above. * Fixing compile time errors IRT error exception handling for Python 3.5. This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
This commit is contained in:
parent
1573066ec1
commit
3fa745eef9
24 changed files with 173 additions and 173 deletions
|
@ -229,7 +229,7 @@ class ElastiCacheManager(object):
|
|||
cache_subnet_group_name=self.cache_subnet_group,
|
||||
preferred_availability_zone=self.zone,
|
||||
port=self.cache_port)
|
||||
except boto.exception.BotoServerError, e:
|
||||
except boto.exception.BotoServerError as e:
|
||||
self.module.fail_json(msg=e.message)
|
||||
|
||||
self._refresh_data()
|
||||
|
@ -256,7 +256,7 @@ class ElastiCacheManager(object):
|
|||
|
||||
try:
|
||||
response = self.conn.delete_cache_cluster(cache_cluster_id=self.name)
|
||||
except boto.exception.BotoServerError, e:
|
||||
except boto.exception.BotoServerError as e:
|
||||
self.module.fail_json(msg=e.message)
|
||||
cache_cluster_data = response['DeleteCacheClusterResponse']['DeleteCacheClusterResult']['CacheCluster']
|
||||
self._refresh_data(cache_cluster_data)
|
||||
|
@ -305,7 +305,7 @@ class ElastiCacheManager(object):
|
|||
security_group_ids=self.security_group_ids,
|
||||
apply_immediately=True,
|
||||
engine_version=self.cache_engine_version)
|
||||
except boto.exception.BotoServerError, e:
|
||||
except boto.exception.BotoServerError as e:
|
||||
self.module.fail_json(msg=e.message)
|
||||
|
||||
self._refresh_data()
|
||||
|
@ -333,7 +333,7 @@ class ElastiCacheManager(object):
|
|||
try:
|
||||
response = self.conn.reboot_cache_cluster(cache_cluster_id=self.name,
|
||||
cache_node_ids_to_reboot=cache_node_ids)
|
||||
except boto.exception.BotoServerError, e:
|
||||
except boto.exception.BotoServerError as e:
|
||||
self.module.fail_json(msg=e.message)
|
||||
|
||||
self._refresh_data()
|
||||
|
@ -432,7 +432,7 @@ class ElastiCacheManager(object):
|
|||
region=connect_region,
|
||||
**self.aws_connect_kwargs
|
||||
)
|
||||
except boto.exception.NoAuthHandlerFound, e:
|
||||
except boto.exception.NoAuthHandlerFound as e:
|
||||
self.module.fail_json(msg=e.message)
|
||||
|
||||
def _get_port(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue