mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Fix undefined variables, basestring usage, and some associated python3 issues
This commit is contained in:
parent
9f7b0dfc30
commit
225fa5d092
84 changed files with 652 additions and 963 deletions
|
@ -81,8 +81,9 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
import re
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
import subprocess
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -161,8 +162,7 @@ def main():
|
|||
)
|
||||
|
||||
module.exit_json(changed=True)
|
||||
except subprocess.CalledProcessError:
|
||||
e = get_exception()
|
||||
except subprocess.CalledProcessError as cpe:
|
||||
module.fail_json(msg=str(dir(cpe)))
|
||||
else:
|
||||
module.exit_json(changed=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue