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

stdout is not restored when printing a traceback #36

Closed
pawamoy opened this issue May 15, 2020 · 0 comments
Closed

stdout is not restored when printing a traceback #36

pawamoy opened this issue May 15, 2020 · 0 comments
Labels
bug Something isn't working error-handling Improvements to error handling

Comments

@pawamoy
Copy link
Member

pawamoy commented May 15, 2020

Describe the bug
If an exception is raised in line-by-line mode, the standard output descriptor is not restored, so the JSON error is not printed, and it makes mkdocstrings hang since there's no output to read.

Expected behavior
stdout should be properly restored when an exception is caught in line-by-line mode.

Additional context
We should move the code responsible for discarding/restoring stdout into the main function of the cli module, so we can restore it in the except handler, and in the finally clause.

@pawamoy pawamoy added the bug Something isn't working label May 15, 2020
@pawamoy pawamoy added the error-handling Improvements to error handling label May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error-handling Improvements to error handling
Projects
None yet
Development

No branches or pull requests

1 participant