Make configparser imports python3 ready

the ConfigParser module was renamed to configparser in Python3.  Use
six.moves to import it so that the modules will function on Python3.
This commit is contained in:
Toshio Kuratomi 2017-02-03 10:01:53 -08:00
commit f75ffe46db
8 changed files with 41 additions and 45 deletions

View file

@ -196,14 +196,15 @@ EXAMPLES = '''
command: DISABLE_FAILURE_PREDICTION
'''
import ConfigParser
import types
import time
import os.path
######################################################################
from ansible.module_utils.basic import AnsibleModule
######################################################################
def which_cmdfile():
locations = [
# rhel
@ -1079,9 +1080,6 @@ class Nagios(object):
self.module.exit_json(nagios_commands=self.command_results,
changed=True)
######################################################################
# import module snippets
from ansible.module_utils.basic import *
if __name__ == '__main__':
main()