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

decode stdout/stderr from run_command (SOFTWARE-5451) #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edquist
Copy link
Contributor

@edquist edquist commented Jan 23, 2023

by default Popen.communicate() returns bytes objects, which are printed in a few places - and show up in the logs as b'...', which is especially annoying due to all the escaped internal newlines.

@matyasselmeci - would you prefer encoding="latin1" or anything? I think that would make the prints print garbage if there is actual utf8 data in stdout/stderr, though I know sometimes you like to guard against stray bits.

by default Popen.communicate() returns bytes objects, which are printed
in a few places - and show up in the logs as b'...', which is especially
annoying due to all the escaped internal newlines.
@matyasselmeci
Copy link
Contributor

matyasselmeci commented Jan 23, 2023

__run_command should never raise an error so either use encoding="latin1" or add errors="surrogateescape" or something...

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.

2 participants