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
This commit is contained in:
Endre János Kovács 2020-07-20 11:31:35 +02:00
parent 703261c6ae
commit d0d865063b
1 changed files with 1 additions and 1 deletions

View File

@ -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)
)