Python 3 compatibility fix - ensure line is always a string / unicode
and not bytes.
# limitations under the License.
from __future__ import absolute_import
+
import logging as stdlib_logging
+import six
from oslo_config import cfg
from st2common.constants.action import ACTION_OUTPUT_RESULT_DELIMITER
@@ -119,6 +121,9 @@ def make_read_and_store_stream_func(execution_db, action_db, store_data_func):
if not line:
break
+ if isinstance(line, six.binary_type):
+ line = line.decode('utf-8')
+
buff.write(line)
# Filter out result delimiter lines
