From 7019b8c35f46baa1ae5c2c029f137f691bfb0e66 Mon Sep 17 00:00:00 2001 From: Ricky Ng-Adam Date: Tue, 20 Aug 2024 14:12:18 -0400 Subject: [PATCH] fixes #3186: check that the section handler_timed_file_handler exists before trying to modify it (#3187) Signed-off-by: Ricky Ng-Adam Co-authored-by: Stephen Curran --- aries_cloudagent/config/logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aries_cloudagent/config/logging.py b/aries_cloudagent/config/logging.py index 9d74b0b0a7..695b680dd2 100644 --- a/aries_cloudagent/config/logging.py +++ b/aries_cloudagent/config/logging.py @@ -118,7 +118,7 @@ def fileConfig( except configparser.ParsingError as e: raise RuntimeError(f"{fname} is invalid: {e}") - if new_file_path: + if new_file_path and cp.has_section("handler_timed_file_handler"): cp.set( "handler_timed_file_handler", "args",