Merge branch 'testing' into upgrade-to-sanic-21

This commit is contained in:
yalh76 2021-06-30 00:00:44 +02:00 committed by GitHub
commit bab653dbd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

7
run.py
View file

@ -409,7 +409,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('utf-8', 'replace')
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