mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Port virt to python3 (#3167)
This commit is contained in:
parent
9be3e67e21
commit
1f406d4530
2 changed files with 3 additions and 2 deletions
|
@ -510,7 +510,8 @@ def main():
|
|||
rc = VIRT_SUCCESS
|
||||
try:
|
||||
rc, result = core(module)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
e = get_exception()
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
if rc != 0: # something went wrong emit the msg
|
||||
|
@ -521,4 +522,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue