Commit 5f0f5363 by Toshio Kuratomi

Merge pull request #12487 from mgedmin/py3k

Fix one more failing test on Python 3
parents 2898e000 95e655eb
......@@ -26,6 +26,8 @@ import re
import stat
import itertools
from six import string_types
from ansible import constants as C
from ansible.errors import AnsibleError
......@@ -78,7 +80,7 @@ class Inventory(object):
def parse_inventory(self, host_list):
if isinstance(host_list, basestring):
if isinstance(host_list, string_types):
if "," in host_list:
host_list = host_list.split(",")
host_list = [ h for h in host_list if h and h.strip() ]
......@@ -589,7 +591,7 @@ class Inventory(object):
def is_file(self):
""" did inventory come from a file? """
if not isinstance(self.host_list, basestring):
if not isinstance(self.host_list, string_types):
return False
return self._loader.path_exists(self.host_list)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment