From 86a46ad6126464b69d1e71bc6e9f343c21e5e6b8 Mon Sep 17 00:00:00 2001 From: BO ZHANG Date: Fri, 12 Jan 2024 10:04:55 +0800 Subject: [PATCH] print func args kwargs for debug purpose --- csst_common/utils/_retry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/csst_common/utils/_retry.py b/csst_common/utils/_retry.py index b41638c..0e4ff1d 100644 --- a/csst_common/utils/_retry.py +++ b/csst_common/utils/_retry.py @@ -30,4 +30,7 @@ def retry(func, *args, **kwargs): return res except BaseException as e: print(f"Error occurs: {e.__repr__()}") + print(f" - func: {func}") + print(f" - args: {args}") + print(f" - kwargs: {kwargs}") raise RuntimeError(f"All {n_try} attempts failed.") -- GitLab