Skip to content

Commit

Permalink
Fix exception handling in __next__
Browse files Browse the repository at this point in the history
  • Loading branch information
sk1p committed Dec 6, 2023
1 parent c51ea2d commit 35ca25b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libertem_live/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ def __iter__(self):
def __next__(self):
try:
return next(self._inner_iter)
except StopIteration:
raise
finally:
except Exception:
self._callback()
raise

def close(self):
try:
Expand Down

0 comments on commit 35ca25b

Please sign in to comment.