mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 (#5852)
This commit is contained in:
committed by
James Cammarata
parent
2d0e9cd75d
commit
658c15930e
@@ -139,7 +139,7 @@ except ImportError:
|
||||
|
||||
try:
|
||||
from dopy.manager import DoError, DoManager
|
||||
except ImportError as e:
|
||||
except ImportError, e:
|
||||
print "failed=True msg='`dopy` library required for this script'"
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ class Ec2Inventory(object):
|
||||
for instance in reservation.instances:
|
||||
self.add_instance(instance, region)
|
||||
|
||||
except boto.exception.BotoServerError as e:
|
||||
except boto.exception.BotoServerError, e:
|
||||
if not self.eucalyptus:
|
||||
print "Looks like AWS is down again:"
|
||||
print e
|
||||
@@ -297,7 +297,7 @@ class Ec2Inventory(object):
|
||||
instances = conn.get_all_dbinstances()
|
||||
for instance in instances:
|
||||
self.add_rds_instance(instance, region)
|
||||
except boto.exception.BotoServerError as e:
|
||||
except boto.exception.BotoServerError, e:
|
||||
if not e.reason == "Forbidden":
|
||||
print "Looks like AWS RDS is down: "
|
||||
print e
|
||||
|
||||
Reference in New Issue
Block a user