2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

master: fix asyncio exception handling

Follow Python 3.8.
This commit is contained in:
Sébastien Bourdeauducq 2024-02-28 12:48:07 +08:00
parent 3e8a853e53
commit 18f55bb196
2 changed files with 4 additions and 4 deletions

View File

@ -239,7 +239,7 @@ class PrepareStage(TaskObject):
try:
await run.build()
await run.prepare()
except:
except Exception:
logger.error("got worker exception in prepare stage, "
"deleting RID %d", run.rid)
log_worker_exception()
@ -289,7 +289,7 @@ class RunStage(TaskObject):
else:
run.status = RunStatus.running
completed = await run.run()
except:
except Exception:
logger.error("got worker exception in run stage, "
"deleting RID %d", run.rid)
log_worker_exception()
@ -326,7 +326,7 @@ class AnalyzeStage(TaskObject):
run.status = RunStatus.analyzing
try:
await run.analyze()
except:
except Exception:
logger.error("got worker exception in analyze stage of RID %d.",
run.rid)
log_worker_exception()

View File

@ -234,7 +234,7 @@ class Worker:
if asyncio.iscoroutine(data):
data = await data
reply = {"status": "ok", "data": data}
except:
except Exception:
reply = {
"status": "failed",
"exception": current_exc_packed()