Catch RuntimeError when loading log config file
Since python 3.12, logging is raising RuntimeError when content is invalid [1][2]. Note this is also backported to 3.11 branch. This is making oslo_log to not raise LogConfigError but throw the underlying RuntimeError. [1]152227b569
[2]12f1581b0c
Change-Id: I7631394bee7281f6a393ab4ba7604f871626997a
This commit is contained in:
parent
eaf6089ab2
commit
390a1d108e
|
@ -231,7 +231,7 @@ def _load_log_config(log_config_append):
|
|||
logging.config.fileConfig(log_config_append,
|
||||
disable_existing_loggers=False)
|
||||
_load_log_config.old_time = new_time
|
||||
except (configparser.Error, KeyError, os.error) as exc:
|
||||
except (configparser.Error, KeyError, os.error, RuntimeError) as exc:
|
||||
raise LogConfigError(log_config_append, str(exc))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue