mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user