mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Migrate basestring to a python3 compatible type (#17199)
This commit is contained in:
parent
a695e18615
commit
a22909c226
28 changed files with 137 additions and 101 deletions
|
@ -277,7 +277,8 @@ To test if something is a string, consider that it may be unicode.
|
|||
if type(x) == str:
|
||||
|
||||
# yes
|
||||
if isinstance(x, basestring):
|
||||
from ansible.compat.six import string_types
|
||||
if isinstance(x, string_types):
|
||||
|
||||
Cleverness
|
||||
==========
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue