cloudstack: update code to match best practice

* Remove catchall exception
* use `if __name__ == '__main__':`
This commit is contained in:
Rene Moser 2015-06-28 12:52:05 +02:00 committed by Matt Clay
parent 4020ebaecf
commit 1aa4d0c2dd
14 changed files with 28 additions and 56 deletions

View file

@ -852,11 +852,9 @@ def main():
except CloudStackException, e:
module.fail_json(msg='CloudStackException: %s' % str(e))
except Exception, e:
module.fail_json(msg='Exception: %s' % str(e))
module.exit_json(**result)
# import module snippets
from ansible.module_utils.basic import *
main()
if __name__ == '__main__':
main()