Fix undefined variables, basestring usage, and some associated python3 issues

This commit is contained in:
Toshio Kuratomi 2017-07-22 18:15:46 -07:00
parent 9f7b0dfc30
commit 225fa5d092
84 changed files with 652 additions and 963 deletions

View file

@ -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)