-
Notifications
You must be signed in to change notification settings - Fork 3.3k
How do you get exit code connect_get_namespaced_pod_exec ? #812
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
Comments
@oz123 The error code arrives in the channel number 3 (error-channel) but it is not exposed by the stream() method. As a workaround you can use:
and you should get
I'm going to add a method to get it in more convenient way. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
fixed by kubernetes-client/python-base#160 /close |
@roycaihw: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When I run this as resp = stream(v1.connect_get_namespaced_pod_exec, podName, namespace, command=exec_command, stderr=True, stdin=False, stdout=True, tty=False, _preload_content=preloadContent) resp.run_forever(timeout=5) Response: However, print(resp.read_channel(1)) gives me proper output. Any pointers why? |
Currently I have to simply do this:
However, I can't get the error code, or the stderror.
Looking at the source code I don't see an easy way.
The text was updated successfully, but these errors were encountered: