Use six.string_types

This commit is contained in:
Colton Myers 2015-05-22 13:04:57 -06:00
parent d7362bb5dd
commit 4b7ef52736

View File

@ -699,7 +699,7 @@ def _validate_str_list(arg):
'''
ensure ``arg`` is a list of strings
'''
if isinstance(arg, string_types):
if isinstance(arg, six.string_types):
return [arg]
elif isinstance(arg, Iterable) and not isinstance(arg, Mapping):
return [str(item) for item in arg]