mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -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
|
@ -86,9 +86,9 @@ def cloud_network(module, state, label, cidr):
|
|||
try:
|
||||
network = pyrax.cloud_networks.create(label, cidr=cidr)
|
||||
changed = True
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
module.fail_json(msg='%s' % e.message)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
module.fail_json(msg='%s' % e.message)
|
||||
|
||||
elif state == 'absent':
|
||||
|
@ -98,7 +98,7 @@ def cloud_network(module, state, label, cidr):
|
|||
changed = True
|
||||
except pyrax.exceptions.NetworkNotFound:
|
||||
pass
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
module.fail_json(msg='%s' % e.message)
|
||||
|
||||
if network:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue