From a5c011a1aa56c2a59e2688659c8c8b4abeb5df4c Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 24 Oct 2023 22:10:43 +0800 Subject: [PATCH] Add Value error --- lib_not_dr/logger/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_not_dr/logger/formatter.py b/lib_not_dr/logger/formatter.py index 62d36a3..529508e 100644 --- a/lib_not_dr/logger/formatter.py +++ b/lib_not_dr/logger/formatter.py @@ -60,7 +60,7 @@ class BaseFormatter(Options): try: return template.substitute(**info) - except KeyError: + except (KeyError, ValueError): return template.safe_substitute(**info) def _format(self, message: FormattingMessage) -> FormattingMessage: