mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
cloudstack: update code to match best practice
* Remove catchall exception * use `if __name__ == '__main__':`
This commit is contained in:
parent
4020ebaecf
commit
1aa4d0c2dd
14 changed files with 28 additions and 56 deletions
|
@ -245,11 +245,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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue