Skip to content

Conversation

Flamefire
Copy link

When neither text nor encoding is specified to subprocess.run then stdout will be of type bytes.

A subsequent str(stdout) causes a BytesWarning which might result in errors, e.g. if python -bb is used.

This adds text=True and removes the now superflous decode and the faulty str calls

When neither `text` nor `encoding` is specified to `subprocess.run` then `stdout` will be of type `bytes`.

A subsequent `str(stdout)` causes a `BytesWarning` which might result in errors, e.g. if `python -bb` is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant