Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport][release_2.2] Use isinstance API instead of type API #1069

Merged
merged 1 commit into from May 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible_runner/utils/__init__.py
Expand Up @@ -432,7 +432,7 @@ def open_fifo_write(path, data):
'''
os.mkfifo(path, stat.S_IRUSR | stat.S_IWUSR)
# If the data is a string instead of bytes, convert it before writing the fifo
if type(data) == str:
if isinstance(data, string_types):
data = data.encode()
threading.Thread(target=lambda p, d: open(p, 'wb').write(d),
args=(path, data)).start()
Expand Down