From cb69414d9cf345d434514b7195258154293d725a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Lehfeld?= <54720674+rlehfeld@users.noreply.github.com> Date: Sat, 21 Sep 2024 18:39:56 +0200 Subject: [PATCH] simplify code --- AsyncLibrary/robot_async.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/AsyncLibrary/robot_async.py b/AsyncLibrary/robot_async.py index e31320f..97e52d0 100644 --- a/AsyncLibrary/robot_async.py +++ b/AsyncLibrary/robot_async.py @@ -457,12 +457,11 @@ def async_get(self, handle=None, timeout=None): if exceptions: if len(exceptions) > 1: eg = getattr(builtins, 'ExceptionGroup', None) - if eg is None: - raise exceptions[-1] - raise eg( - 'async_get caught exceptions', - exceptions - ) + if eg is not None: + raise eg( + 'async_get caught exceptions', + exceptions + ) raise exceptions[-1] ret = [futures[h].result() for h in handles]