server: better handling of cfgfile argument

No reason to keep stringly-typed data on that level

Change-Id: Iba8d88301bf36ef6051031d1916d1bac84ede546
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34893
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Georg Brandl
2024-10-29 14:03:19 +01:00
committed by Markus Zolliker
parent 8e05090795
commit aee99df2d0
7 changed files with 20 additions and 16 deletions

View File

@ -172,8 +172,8 @@ def load_config(cfgfiles, log):
Only the node-section of the first config file will be returned.
The others will be discarded.
Arguments
- cfgfiles : str
Comma separated list of config-files
- cfgfiles : list
List of config file paths
- log : frappy.logging.Mainlogger
Logger aquired from frappy.logging
Returns
@ -181,8 +181,8 @@ def load_config(cfgfiles, log):
merged configuration
"""
config = None
for cfgfile in cfgfiles.split(','):
filename = to_config_path(cfgfile, log)
for cfgfile in cfgfiles:
filename = to_config_path(str(cfgfile), log)
log.debug('Parsing config file %s...', filename)
cfg = process_file(filename, log)
if config: