summaryrefslogtreecommitdiffstats
path: root/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-09-16 14:20:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-09-16 14:20:52 +0000
commita15f7aad5df29a780dde442155e29b940f671ce2 (patch)
tree3407ec30be7c0d96792f883acba0786b40bc04ca /debian/patches/0004-Avoid-writing-bytes-to-stdout.patch
parentRediffing Avoid-writing-bytes-to-stdout.patch. (diff)
downloadterminaltables-a15f7aad5df29a780dde442155e29b940f671ce2.tar.xz
terminaltables-a15f7aad5df29a780dde442155e29b940f671ce2.zip
Renumbering patches.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/0004-Avoid-writing-bytes-to-stdout.patch')
-rw-r--r--debian/patches/0004-Avoid-writing-bytes-to-stdout.patch21
1 files changed, 0 insertions, 21 deletions
diff --git a/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch b/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch
deleted file mode 100644
index cf36463..0000000
--- a/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Author: Carl Suster <carl@contraflo.ws>
-Description: Avoid writing bytes to stdout
- In Python 3, bytes should be written to the underlying buffer object
- rather than directly to stdout. This was causing legitimate test
- failures.
-
-diff -Naurp terminaltables.orig/terminaltables/terminal_io.py terminaltables/terminaltables/terminal_io.py
---- terminaltables.orig/terminaltables/terminal_io.py
-+++ terminaltables/terminaltables/terminal_io.py
-@@ -94,5 +94,10 @@ def set_terminal_title(title, kernel32=N
- return kernel32.SetConsoleTitleW(title) != 0
-
- # Linux/OSX.
-- sys.stdout.write(b'\033]0;' + title_bytes + b'\007')
-+ set_title = b'\033]0;' + title_bytes + b'\007'
-+ if hasattr(sys.stdout, 'buffer'):
-+ sys.stdout.buffer.write(set_title)
-+ else:
-+ text = set_title.decode(sys.stdout.encoding, 'strict')
-+ sys.stdout.write(text)
- return True