Stupid hack for pepettes_ynh which has a epic weird bug with unicode stuff during tests... lynx+euro symbol idk

This commit is contained in:
Alexandre Aubin 2021-03-23 00:52:23 +01:00 committed by GitHub
parent 444de3ae11
commit cd89ea729b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

7
run.py
View file

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