From f2c562ac9f0225c486844e75950d12928ee8a678 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Thu, 8 Nov 2018 22:32:08 +0800 Subject: [PATCH] fix interactive bug --- webterminal/interactive.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webterminal/interactive.py b/webterminal/interactive.py index e2b84673..dac648e7 100644 --- a/webterminal/interactive.py +++ b/webterminal/interactive.py @@ -133,6 +133,8 @@ def posix_shell(chan, channel, log_name=None, width=90, height=40, elementid=Non 'text': json.dumps(['stdout', smart_unicode(x)])}) except socket.timeout: pass + except UnicodeDecodeError: + channel_layer.send(channel, {'bytes': data}) except Exception, e: print(type(data)) print(repr(data))