|
|
@ -317,7 +317,7 @@ def core(module):
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
api_token = module.params['api_token'] or os.environ['DO_API_TOKEN'] or os.environ['DO_API_KEY']
|
|
|
|
api_token = module.params['api_token'] or os.environ['DO_API_TOKEN'] or os.environ['DO_API_KEY']
|
|
|
|
except KeyError, e:
|
|
|
|
except KeyError as e:
|
|
|
|
module.fail_json(msg='Unable to load %s' % e.message)
|
|
|
|
module.fail_json(msg='Unable to load %s' % e.message)
|
|
|
|
|
|
|
|
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
@ -433,9 +433,9 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
core(module)
|
|
|
|
core(module)
|
|
|
|
except TimeoutError, e:
|
|
|
|
except TimeoutError as e:
|
|
|
|
module.fail_json(msg=str(e), id=e.id)
|
|
|
|
module.fail_json(msg=str(e), id=e.id)
|
|
|
|
except (DoError, Exception), e:
|
|
|
|
except (DoError, Exception) as e:
|
|
|
|
module.fail_json(msg=str(e))
|
|
|
|
module.fail_json(msg=str(e))
|
|
|
|
|
|
|
|
|
|
|
|
# import module snippets
|
|
|
|
# import module snippets
|
|
|
|