8000 FIX: guess_stream_needs_encoding must return False when fileobj is an instance of io.TextIOBase by ninousf · Pull Request #185 · crossbario/txaio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FIX: guess_stream_needs_encoding must return False when fileobj is an instance of io.TextIOBase #185

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to lo 8000 ad files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions txaio/_iotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ def guess_stream_needs_encoding(fileobj, default=True):
except Exception:
pass

try:
import io
return not isinstance(fileobj, io.TextIOBase)
except Exception:
pass

return default
0