From 824d3e7b7a3bd7aedb4b3e163d6cce027dbe260c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 17 Oct 2024 16:21:24 +0200 Subject: [PATCH] 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 Reviewed-by: Georg Brandl --- frappy/lib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappy/lib/__init__.py b/frappy/lib/__init__.py index d835c72..b038fe8 100644 --- a/frappy/lib/__init__.py +++ b/frappy/lib/__init__.py @@ -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