Skip to content

Commit 015aa14

Browse files
committed
add a RuntimeError and remove noqa: RET003
1 parent b64db79 commit 015aa14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylhc/data_extract/lsa.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def _beamprocess_to_dict(bp):
390390
return bp_dict
391391

392392

393-
def try_to_acquire_data(function: Callable, *args, **kwargs): # noqa: RET503
393+
def try_to_acquire_data(function: Callable, *args, **kwargs):
394394
"""Tries to get data from function multiple times.
395395
TODO: Move to omc3 as is also used there in BBQ extraction.
396396
@@ -413,3 +413,4 @@ def try_to_acquire_data(function: Callable, *args, **kwargs): # noqa: RET503
413413
LOG.warning(f"Could not acquire data! Trial no {tries + 1} / {retries}")
414414
continue # will go to the next iteratoin of the loop, so retry
415415
raise OSError("Could not acquire data!") from e
416+
raise RuntimeError(f"Could not acquire data after {retries:d} retries.")

0 commit comments

Comments
 (0)