mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Use six.move for module in module_utils/facts.py
This commit is contained in:
committed by
Toshio Kuratomi
parent
a4660766f7
commit
4549604cc7
@@ -34,23 +34,9 @@ import pwd
|
||||
|
||||
from ansible.module_utils.basic import get_all_subclasses
|
||||
from ansible.module_utils.six import PY3, iteritems
|
||||
from ansible.module_utils.six.moves import configparser, StringIO
|
||||
from ansible.module_utils._text import to_native
|
||||
|
||||
# py2 vs py3; replace with six via ansiballz
|
||||
try:
|
||||
# python2
|
||||
import ConfigParser as configparser
|
||||
except ImportError:
|
||||
# python3
|
||||
import configparser
|
||||
|
||||
try:
|
||||
# python2
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
# python3
|
||||
from io import StringIO
|
||||
|
||||
try:
|
||||
# python2
|
||||
from string import maketrans
|
||||
|
||||
Reference in New Issue
Block a user