1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

switched to elif

This commit is contained in:
Brian Coca 2017-07-05 11:02:22 -04:00
parent 613327d47a
commit 365f3dc9d9

View file

@ -656,11 +656,11 @@ class Ec2Inventory(object):
if e.error_code == 'AuthFailure': if e.error_code == 'AuthFailure':
error = self.get_auth_error_message() error = self.get_auth_error_message()
if e.error_code == "OptInRequired": elif e.error_code == "OptInRequired":
error = "RDS hasn't been enabled for this account yet. " \ error = "RDS hasn't been enabled for this account yet. " \
"You must either log in to the RDS service through the AWS console to enable it, " \ "You must either log in to the RDS service through the AWS console to enable it, " \
"or set 'rds = False' in ec2.ini" "or set 'rds = False' in ec2.ini"
if not e.reason == "Forbidden": elif not e.reason == "Forbidden":
error = "Looks like AWS RDS is down:\n%s" % e.message error = "Looks like AWS RDS is down:\n%s" % e.message
self.fail_with_error(error, 'getting RDS instances') self.fail_with_error(error, 'getting RDS instances')
@ -742,11 +742,11 @@ class Ec2Inventory(object):
if e.error_code == 'AuthFailure': if e.error_code == 'AuthFailure':
error = self.get_auth_error_message() error = self.get_auth_error_message()
if e.error_code == "OptInRequired": elif e.error_code == "OptInRequired":
error = "ElastiCache hasn't been enabled for this account yet. " \ error = "ElastiCache hasn't been enabled for this account yet. " \
"You must either log in to the ElastiCache service through the AWS console to enable it, " \ "You must either log in to the ElastiCache service through the AWS console to enable it, " \
"or set 'elasticache = False' in ec2.ini" "or set 'elasticache = False' in ec2.ini"
if not e.reason == "Forbidden": elif not e.reason == "Forbidden":
error = "Looks like AWS ElastiCache is down:\n%s" % e.message error = "Looks like AWS ElastiCache is down:\n%s" % e.message
self.fail_with_error(error, 'getting ElastiCache clusters') self.fail_with_error(error, 'getting ElastiCache clusters')