Inverse excepts for more accurate log message in Python 3.7

pull/135/head
Fabian Elsner 2023-02-08 13:18:17 +01:00 zatwierdzone przez Florian Ludwig
rodzic a6b54a9dd5
commit d438202610
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -879,12 +879,12 @@ class Broker:
task = running_tasks.popleft()
try:
task.result() # make asyncio happy and collect results
except CancelledError:
self.logger.info("Task has been cancelled: %s", task)
except Exception:
self.logger.exception(
"Task failed and will be skipped: %s", task
)
except CancelledError:
self.logger.info("Task has been cancelled: %s", task)
run_broadcast_task = self._run_broadcast(running_tasks)