From d0d865063b56c76f45d38bf99c722d2efff02a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20J=C3=A1nos=20Kov=C3=A1cs?= Date: Mon, 20 Jul 2020 11:31:35 +0200 Subject: [PATCH] Fix Python 3 compatibility issue in V8EvalEvaluator str.encode() is now not only unnecessary but it actually breaks the action by converting the input str to bytes. Since Python 2 support has been dropped, the call to encode() can simply be removed. Change-Id: I8f5ee8ae9542d9a15fb0937b4a9de1db9915a3a7 --- mistral/utils/javascript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mistral/utils/javascript.py b/mistral/utils/javascript.py index 2b6895b66..28622e385 100644 --- a/mistral/utils/javascript.py +++ b/mistral/utils/javascript.py @@ -75,7 +75,7 @@ class V8EvalEvaluator(JSEvaluator): ctx_str = utils.to_json_str(ctx) return v8.eval( - ('$ = %s; %s' % (ctx_str, script)).encode(encoding='UTF-8') + '$ = %s; %s' % (ctx_str, script) )