ensure INSTANCE_HOME is correct in all use cases
This commit is contained in:
parent
44b757f447
commit
203c869638
7
config/scodocutils.py
Normal file → Executable file
7
config/scodocutils.py
Normal file → Executable file
@ -9,6 +9,12 @@ import sys, os, psycopg2, glob, subprocess, traceback, time
|
|||||||
|
|
||||||
sys.path.append("..")
|
sys.path.append("..")
|
||||||
|
|
||||||
|
# INSTANCE_HOME est nécessaire pour sco_utils.py
|
||||||
|
# note: avec le python 2.7 de Zope2, l'import de pyscopg2 change
|
||||||
|
# INSTANCE_HOME dans l'environnement !
|
||||||
|
# Ici on le fixe à la "bonne" valeur pour ScoDoc7.
|
||||||
|
os.environ["INSTANCE_HOME"] = "/opt/scodoc"
|
||||||
|
|
||||||
|
|
||||||
def log(msg):
|
def log(msg):
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
@ -26,6 +32,7 @@ if not SCODOC_VAR_DIR:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
SCODOC_LOGOS_DIR = os.environ.get("SCODOC_LOGOS_DIR", "")
|
SCODOC_LOGOS_DIR = os.environ.get("SCODOC_LOGOS_DIR", "")
|
||||||
|
|
||||||
|
|
||||||
def get_dept_cnx_str(dept):
|
def get_dept_cnx_str(dept):
|
||||||
"db cnx string for dept"
|
"db cnx string for dept"
|
||||||
f = os.path.join(SCODOC_VAR_DIR, "config", "depts", dept + ".cfg")
|
f = os.path.join(SCODOC_VAR_DIR, "config", "depts", dept + ".cfg")
|
||||||
|
Loading…
Reference in New Issue
Block a user