configd - except configparser read (#5836)

This commit is contained in:
agh1467 2022-07-03 13:27:31 -04:00 committed by GitHub
parent 98fe7a3881
commit 6a69e524e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)