Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
rlehfeld committed Sep 21, 2024
1 parent d520a21 commit cb69414
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions AsyncLibrary/robot_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit cb69414

Please sign in to comment.