From 1ba0ae245411d39f4cae6c90df1559adae8287c4 Mon Sep 17 00:00:00 2001 From: Parmita Mehta Date: Tue, 18 Jul 2017 14:32:59 -0700 Subject: [PATCH] code review fixes --- python/MyriaPythonWorker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/MyriaPythonWorker.py b/python/MyriaPythonWorker.py index 709746497..aeec09d3c 100644 --- a/python/MyriaPythonWorker.py +++ b/python/MyriaPythonWorker.py @@ -125,8 +125,9 @@ def write_with_length(cls, obj, stream, output_type): cls.write_int(DataType.BLOB, stream) cls.pickle_and_write(obj, stream) elif output_type == DataType.EXCEPTION: + assert type(obj) is str cls.write_int(len(obj), stream) - stream.write(str(obj)) + stream.write(obj) @classmethod def read_command(cls, stream):