diff options
author | Jakub Stasiak <jakub@stasiak.at> | 2020-02-08 13:52:06 +0100 |
---|---|---|
committer | Jakub Stasiak <jakub@stasiak.at> | 2020-02-08 13:52:06 +0100 |
commit | e946ac7cdb4e61458502da629d79d78cac22d060 (patch) | |
tree | e1d68134c4b697240d5a296c7f0d2f83f27e0f50 /tests | |
parent | 0e4eb9bff3763d3372f23b27f9c2390705e2d962 (diff) | |
download | screenplain-e946ac7cdb4e61458502da629d79d78cac22d060.tar.gz |
Fix "TypeError: write() argument must be str, not bytes" on Python 3
This used to happen when writing to stdout. On Python 3 stdout is an
instance of TextIOWrapper which is a text-based interface. It wraps a
bytes-based writer though which is accessible through the buffer
attribute, so let's use that to either write to it directly or to get an
encoding writer.
Fixes https://github.com/vilcans/screenplain/issues/53.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions