diff --git a/tosfs/stability.py b/tosfs/stability.py index 6a0e027..c044bb1 100644 --- a/tosfs/stability.py +++ b/tosfs/stability.py @@ -95,13 +95,15 @@ def retryable_func_executor( raise e if is_retryable_exception(e): - logger.warn("Retry TOS request in the %d times, error: %s", attempt, e) + logger.warning("Retry TOS request in the %d times, error: %s", attempt, e) try: time.sleep(min(1.7**attempt * 0.1, 15)) except InterruptedError as ie: raise TosfsError(f"Request {func} interrupted.") from ie else: raise e + # Note: maybe not all the retryable exceptions are warped by `TosError` + # Will pay attention to those cases except Exception as e: raise TosfsError(f"{e}") from e