-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
BrokenPipeError: [Errno 32] Broken pipe #302
Comments
Thanks for this old bug report. In the described scenario (piping output from colorama into 'head', it seems like the correct behavior would be to catch this exception and silently exit with value 0. Are there cases where that is not the correct behavior on catching a BrokenPipeError? |
I don't see how this has anything to do with colorama? The exception is being raised by Python itself; colorama only shows up in the traceback because the output is going through it. There's probably some subtle difference in when buffered output gets flushed depending on whether colorama is enabled or not, that happens to tickle the issue in this case, but the underlying issue is independent. Anyway with the new |
Originally reported at Azure/azure-cli#13413
Colorama fails if output is redirected to
head
command.test.py:
Output:
The text was updated successfully, but these errors were encountered: