mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 21:39:10 -07:00
Fixing Rackspace compile time errors irt exception handling for Python 3 (#3849)
This commit is contained in:
parent
7960e99310
commit
7e4b1ebff5
19 changed files with 94 additions and 94 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue