mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07: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:
parent
272ff10fa1
commit
f75ffe46db
8 changed files with 41 additions and 45 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue