From 31706093fb8adbb951d78c13a92d9a776650b879 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Thu, 23 Feb 2023 08:42:28 +0100 Subject: [PATCH] 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 Tested-by: Jenkins Automated Tests --- frappy/lib/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappy/lib/__init__.py b/frappy/lib/__init__.py index 069239d..7cab1d3 100644 --- a/frappy/lib/__init__.py +++ b/frappy/lib/__init__.py @@ -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 /cfg/generalConfig.cfg