cfg path quick fix for hands-on session

Change-Id: If79f76ed17dce6a5587deaae2eae4eda77546306
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30503
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
This commit is contained in:
zolliker 2023-02-23 08:42:28 +01:00
parent f4fac1f3dd
commit 31706093fb

View File

@ -21,6 +21,7 @@
# *****************************************************************************
"""Define helpers"""
import os
import importlib
import linecache
import socket
@ -70,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')):
elif path.exists(path.join(repodir, '.git')) or os.sep == '\\': # for hands on session
# running from git repo
cfg['confdir'] = path.join(repodir, 'cfg')
# take logdir and piddir from <repodir>/cfg/generalConfig.cfg