lib: there might be no confdir in "cfg"

Change-Id: I0832de4564a2c1ff439c486ae6cbaa776ebf1e59
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34833
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
This commit is contained in:
Georg Brandl 2024-10-17 16:21:24 +02:00 committed by Markus Zolliker
parent dab963f1bb
commit 824d3e7b7a

View File

@ -126,7 +126,7 @@ class GeneralConfig:
raise KeyError(f"missing value for {' and '.join(missing_keys)} in {configfile}")
raise KeyError('missing %s'
% ' and '.join('FRAPPY_%s' % k.upper() for k in missing_keys))
if isinstance(cfg['confdir'], Path):
if 'confdir' in cfg and isinstance(cfg['confdir'], Path):
cfg['confdir'] = [cfg['confdir']]
# this is not customizable
cfg['basedir'] = repodir