reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 (#5852)

This commit is contained in:
Timur Batyrshin
2014-02-02 21:33:27 +04:00
committed by James Cammarata
parent 2d0e9cd75d
commit 658c15930e
27 changed files with 118 additions and 118 deletions

View File

@@ -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)

View File

@@ -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