S101: fix

This commit is contained in:
Jörg Thalheim
2025-08-25 12:26:00 +02:00
parent 332d10e306
commit 6a2dfb8176
8 changed files with 38 additions and 15 deletions

View File

@@ -281,7 +281,9 @@ class AsyncRuntime:
for name, task in self.tasks.items():
if task.finished and task.async_opts.check:
assert task.result is not None
if task.result is None:
msg = f"Task {name} finished but has no result"
raise ClanError(msg)
error = task.result.error
if error is not None:
if log.isEnabledFor(logging.DEBUG):