add nicosenv to PATH before starting
asssure that PATH and therefore python venv ist the same when starting frappy from NICOS and from commandline
This commit is contained in:
parent
8b13e32ed7
commit
910f281b0c
5
base.py
5
base.py
@ -24,7 +24,7 @@
|
||||
import sys
|
||||
import json
|
||||
import os
|
||||
from os.path import expanduser, basename
|
||||
from os.path import expanduser, basename, exists
|
||||
import subprocess
|
||||
import time
|
||||
import re
|
||||
@ -357,6 +357,9 @@ class ServiceManager:
|
||||
os.chdir(start_dir)
|
||||
if start_dir not in sys.path:
|
||||
sys.path.insert(0, start_dir)
|
||||
nicosenv = '/home/nicos/nicos/nicosenv/bin/'
|
||||
if exists(nicosenv):
|
||||
env['PATH'] = f"{nicosenv}:{env['PATH']}"
|
||||
if wait:
|
||||
proc = subprocess.Popen(cmd.split(), env=env)
|
||||
for _ in range(3):
|
||||
|
Loading…
x
Reference in New Issue
Block a user