Fixing Rackspace compile time errors irt exception handling for Python 3 (#3849)

This commit is contained in:
@ 2016-06-03 06:39:59 -07:00 committed by Matt Clay
parent 7960e99310
commit 7e4b1ebff5
19 changed files with 94 additions and 94 deletions

View file

@ -141,12 +141,12 @@ def rax_asp(module, at=None, change=0, cron=None, cooldown=300,
except ValueError:
try:
sg = au.find(name=scaling_group)
except Exception, e:
except Exception as e:
module.fail_json(msg='%s' % e.message)
else:
try:
sg = au.get(scaling_group)
except Exception, e:
except Exception as e:
module.fail_json(msg='%s' % e.message)
if state == 'present':
@ -168,7 +168,7 @@ def rax_asp(module, at=None, change=0, cron=None, cooldown=300,
desired_capacity=desired_capacity,
args=args)
changed = True
except Exception, e:
except Exception as e:
module.fail_json(msg='%s' % e.message)
else:
@ -217,7 +217,7 @@ def rax_asp(module, at=None, change=0, cron=None, cooldown=300,
else:
policy.delete()
changed = True
except Exception, e:
except Exception as e:
module.fail_json(msg='%s' % e.message)
module.exit_json(changed=changed, autoscale_policy=rax_to_dict(policy))