Don't decode str in LogStreamingHandler

When we encounter an exception during log streaming we send an error
message through the websocket. However we decode the error message
which is already a str object which doesn't work. Thus the error
message will never arrive at the user. Fix that by just sending the
message.

Change-Id: I488cbfd2bb2f44f10921ab5a0cc16ae9ba4d2537
This commit is contained in:
Tobias Henkel 2018-02-12 08:33:36 +01:00
parent 16c3450d01
commit 7f3d1f237f
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 1 additions and 2 deletions

View File

@ -101,8 +101,7 @@ class LogStreamingHandler(object):
)
except Exception as e:
self.log.exception("Finger client exception:")
msg = "Failure from finger client: %s" % e
await ws.send_str(msg.decode('utf8'))
await ws.send_str("Failure from finger client: %s" % e)
return (1000, "No more data")