-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Docker environment: check for None on stdout/stderr response #9238
Conversation
Docker returns None if there wasn't anything printed to stdout/stderr.
@@ -315,8 +315,8 @@ def run(self): | |||
cmd_stdout, cmd_stderr = out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, you could set defaults at the top -- plus a walrus!
cmd_stdout, cmd_stderr = out | |
cmd_stdout, cmd_stderr = (out := ("", "")) |
If it helps to default cmd_stdout
to ""
instead of None
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides the real output
>>> out = (None, "foo")
>>> cmd_stdout, cmd_stderr = (out := ("", ""))
>>> cmd_stdout
''
>>> cmd_stderr
''
Co-authored-by: Eric Holscher <[email protected]>
I think the problem should be fixed in
If |
Docker returns None if there wasn't anything printed
to stdout/stderr.