From 4549604cc73321c079ad0eec53dd3f898c63be4b Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 20 Oct 2016 00:18:36 +0200 Subject: [PATCH] Use six.move for module in module_utils/facts.py --- lib/ansible/module_utils/facts.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index a1593b5b885..cb7ffb74e55 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -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