In CRL Core, in alliance.conf use ALLIANCE_TOP environement variable if set.

This commit is contained in:
Jean-Paul Chaput 2016-08-01 12:13:44 +02:00
parent db098db351
commit 1e21651e1e
2 changed files with 20 additions and 4 deletions

View File

@ -1,10 +1,18 @@
# -*- Mode:Python; explicit-buffer-name: "alliance.conf<cmos>" -*-
import os
from helpers.Alliance import AddMode
from helpers.Alliance import Gauge
allianceTop = '/soc/alliance'
allianceTop = None
if os.environ.has_key['ALLIANCE_TOP']:
allianceTop = os.environ['ALLIANCE_TOP']
if not os.path.isdir(allianceTop):
allianceTop = None
if not allianceTop: allianceTop = '/soc/alliance'
cellsTop = allianceTop+'/cells/'

View File

@ -1,11 +1,19 @@
# -*- Mode:Python; explicit-buffer-name: "alliance.conf<scmos_deep_018>" -*-
import os
from helpers.Alliance import AddMode
from helpers.Alliance import Gauge
allianceTop = '/soc/alliance'
cellsTop = allianceTop+'/cells'
allianceTop = None
if os.environ.has_key['ALLIANCE_TOP']:
allianceTop = os.environ['ALLIANCE_TOP']
if not os.path.isdir(allianceTop):
allianceTop = None
if not allianceTop: allianceTop = '/soc/alliance'
cellsTop = allianceTop+'/cells/'
allianceConfig = \