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

Handle monkey-patched stdout #404

Merged
merged 2 commits into from
Mar 22, 2022
Merged

Handle monkey-patched stdout #404

merged 2 commits into from
Mar 22, 2022

Conversation

bbeattie-phxlabs
Copy link
Contributor

Summary

In some Python environments (e.g. Maya 2022's mayapy.exe), sys.stdout has been monkey-patched to something other than the expected stdout. As such, it doesn't actually have an isatty method and raises an AttributeError in response.

bbeattie-phxlabs and others added 2 commits March 21, 2022 16:22
In some Python environments (e.g. Maya 2022's mayapy.exe), sys.stdout has been monkey-patched to something other than the expected stdout. As such, it doesn't actually have an `isatty` method and raises an AttributeError in response.
Copy link
Owner

@hynek hynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man that expression is getting more and more fun!

Thanks!

@hynek hynek merged commit 3d16e95 into hynek:main Mar 22, 2022
hynek added a commit that referenced this pull request Mar 22, 2022
hynek pushed a commit that referenced this pull request Mar 22, 2022
* Handle monkey-patched stdout

In some Python environments (e.g. Maya 2022's mayapy.exe), sys.stdout has been monkey-patched to something other than the expected stdout. As such, it doesn't actually have an `isatty` method and raises an AttributeError in response.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@bbeattie-phxlabs bbeattie-phxlabs deleted the patch-1 branch April 4, 2022 21:48
said-flwls pushed a commit to said-flwls/structlog that referenced this pull request May 10, 2023
* Handle monkey-patched stdout

In some Python environments (e.g. Maya 2022's mayapy.exe), sys.stdout has been monkey-patched to something other than the expected stdout. As such, it doesn't actually have an `isatty` method and raises an AttributeError in response.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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