summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Kolb <bernd.kolb@gmail.com>2019-06-14 22:28:37 +0200
committerGitHub <noreply@github.com>2019-06-14 22:28:37 +0200
commit779bebc6d22efcd2f72ac355e4cc3f1c029a8603 (patch)
treef4786ee6f2bb2be1228f369b7732435b624be11e
parent68fe449e4c50270bd7b904be6df0653fff54c5a8 (diff)
Make InkStitch run in Inkscape 1.0 alpha
I downloaded inkscape 1.0 alpha for MacOS from the inkscape build server and installed inkstitch. For me it seems to run with python 3. Thus I am getting error messages like `TypeError: write() argument must be str, not bytes` which are fixed by this commit.
-rw-r--r--stub.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/stub.py b/stub.py
index 7c997524..c7ff5fa5 100644
--- a/stub.py
+++ b/stub.py
@@ -48,12 +48,12 @@ if sys.platform == "win32":
import msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
-sys.stdout.write(stdout)
+sys.stdout.write(stdout.decode(sys.stdout.encoding))
sys.stdout.flush()
stderr = stderr.strip()
if stderr:
- sys.stderr.write(stderr.strip())
+ sys.stderr.write(stderr.decode(sys.stdout.encoding).strip())
sys.stderr.flush()
sys.exit(extension.returncode)