mirror of https://github.com/m-labs/artiq.git
master: fix asyncio exception handling
Follow Python 3.8.
This commit is contained in:
parent
3e8a853e53
commit
18f55bb196
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue