better guess for cfg file location

check for existence of repodir+'/cfg' instead of repodir+'/.git'

fixes #4692

Change-Id: Ida841cd31eba851305bcfc0d96019710340c3140
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30510
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
zolliker 2023-02-23 17:40:54 +01:00
parent 819026659a
commit b5205d7c7a

View File

@ -71,7 +71,7 @@ class GeneralConfig:
if path.splitext(sys.executable)[1] == ".exe" and not path.basename(sys.executable).startswith('python'):
# special MS windows environment
cfg.update(piddir='./', logdir='./log', confdir='./')
elif path.exists(path.join(repodir, '.git')) or os.sep == '\\': # for hands on session
elif path.exists(path.join(repodir, 'cfg')):
# running from git repo
cfg['confdir'] = path.join(repodir, 'cfg')
# take logdir and piddir from <repodir>/cfg/generalConfig.cfg