From cd89ea729be43469d3233ebe634cedad51cf0f46 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Mar 2021 00:52:23 +0100 Subject: [PATCH] Stupid hack for pepettes_ynh which has a epic weird bug with unicode stuff during tests... lynx+euro symbol idk --- run.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 41fd959..f1ff037 100644 --- a/run.py +++ b/run.py @@ -403,7 +403,12 @@ async def run_job(worker, job): while not command.stdout.at_eof(): data = await command.stdout.readline() - job.log += data.decode() + try: + job.log += data.decode() + except UnicodeDecodeError as e: + job.log += "Uhoh ?! UnicodeDecodeError in yunorunner !?" + job.log += str(e) + # XXX seems to be okay performance wise but that's probably going to be # a bottleneck at some point :/ # theoritically jobs are going to have slow output