diff libervia/frontends/tools/aio.py @ 4233:d01b8d002619

cli (call, file), frontends: implement webRTC data channel transfer: - file send/receive commands now supports webRTC transfer. In `send` command, the `--webrtc` flags is currenty used to activate it. - WebRTC related code have been factorized and moved to `libervia.frontends.tools.webrtc*` modules. rel 442
author Goffi <goffi@goffi.org>
date Sat, 06 Apr 2024 13:43:09 +0200
parents 5de6f3595380
children
line wrap: on
line diff
--- a/libervia/frontends/tools/aio.py	Sat Apr 06 12:59:50 2024 +0200
+++ b/libervia/frontends/tools/aio.py	Sat Apr 06 13:43:09 2024 +0200
@@ -34,7 +34,7 @@
     """
     background_tasks.discard(task)
     e = task.exception()
-    if e is not None:
+    if e is not None and not isinstance(e, SystemExit):
         exc_info = (type(e), e, e.__traceback__)
         log.error("Task failed:", exc_info=exc_info)
 
@@ -57,7 +57,7 @@
 
 
 def run_with_args(
-    async_method: Callable[..., Coroutine[Any, Any, Any]], *args: Any, **kwargs: Any
+    async_method: Callable[..., Coroutine], *args: Any, **kwargs: Any
 ) -> None:
     """Schedules and tracks an asynchronous method with arguments.
 
@@ -72,7 +72,7 @@
 
 
 def run_from_thread(
-    async_method: Coroutine | asyncio.Future,
+    async_method: Callable[..., Coroutine] | Callable[..., asyncio.Future],
     *args,
     loop: asyncio.AbstractEventLoop | None = None,
     **kwargs,