summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch')
-rw-r--r--dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch b/dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch
new file mode 100644
index 000000000000..e463ff66f93b
--- /dev/null
+++ b/dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch
@@ -0,0 +1,23 @@
+From 9cb9d0ef11fac861e46776fb18cef309df28c234 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 30 Jul 2020 07:59:05 +0200
+Subject: [PATCH] Fix writing binary data to sys.stdout
+
+---
+ terminaltables/terminal_io.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/terminaltables/terminal_io.py b/terminaltables/terminal_io.py
+index 8b8c10d..310263c 100644
+--- a/terminaltables/terminal_io.py
++++ b/terminaltables/terminal_io.py
+@@ -94,5 +94,5 @@ def set_terminal_title(title, kernel32=None):
+ return kernel32.SetConsoleTitleW(title) != 0
+
+ # Linux/OSX.
+- sys.stdout.write(b'\033]0;' + title_bytes + b'\007')
++ sys.stdout.buffer.write(b'\033]0;' + title_bytes + b'\007')
+ return True
+--
+2.28.0
+