From 6a69e524e09a4bf1e1c3e8fdb47f902f9eceaedc Mon Sep 17 00:00:00 2001 From: agh1467 <7823088+agh1467@users.noreply.github.com> Date: Sun, 3 Jul 2022 13:27:31 -0400 Subject: [PATCH] configd - except configparser read (#5836) --- src/opnsense/service/modules/processhandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opnsense/service/modules/processhandler.py b/src/opnsense/service/modules/processhandler.py index 597c460b9..6d9a39d9b 100644 --- a/src/opnsense/service/modules/processhandler.py +++ b/src/opnsense/service/modules/processhandler.py @@ -260,7 +260,11 @@ class ActionHandler(object): # traverse config directory and open all filenames starting with actions_ cnf = configparser.RawConfigParser() - cnf.read(config_filename) + try: + cnf.read(config_filename) + except configparser.Error: + syslog_error('exception occurred while reading "%s": %s' % (config_filename, traceback.format_exc(0))) + for section in cnf.sections(): # map configuration data on object action_obj = Action(config_environment=self.config_environment)