mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +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:
@@ -21,13 +21,7 @@ from io import StringIO
|
||||
import os
|
||||
import re
|
||||
|
||||
try:
|
||||
# python2
|
||||
import ConfigParser as configparser
|
||||
except ImportError:
|
||||
# python3
|
||||
import configparser
|
||||
|
||||
from ansible.compat.six.moves import configparser
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
|
||||
Reference in New Issue
Block a user