https://github.com/ETCBC/shebanq
Raw File
Tip revision: 25e30accad6990bc0fd9831e5e75801a5994e25f authored by Dirk Roorda on 20 October 2021, 14:17:43 UTC
docs
Tip revision: 25e30ac
dbconfig.py
import os

EMDROS_VERSIONS = [
    "emdros 3.4.0",
    "3.4.1.pre12",
    "emdros 3.5.3",
    "emdros 3.7.3",
]
"""Emdros versions that have been in use by SHEBANQ.

Copied manually from /opt/emdros/include/emdros/version-emdros.h
"""

CONFIG = dict(shebanqUser="shebanq")
"""Connection details for the databases.
"""

configPath = "/opt/cfg/mql.cfg"
if os.path.exists(configPath):
    with open(configPath) as p:
        CONFIG["shebanqPassword"] = p.read().rstrip("\n")
else:
    CONFIG["shebanqPassword"] = "localpwd"

configPath = "/opt/cfg/host.cfg"
if os.path.exists(configPath):
    with open(configPath) as p:
        CONFIG["shebanqHost"] = p.read().rstrip("\n")
else:
    CONFIG["shebanqHost"] = "localhost"
back to top