core: local_dir can now be overrided (usefull to launch 2 instances at the same time)
This commit is contained in:
parent
b2ef5b28ac
commit
3472a07461
1 changed files with 15 additions and 2 deletions
|
|
@ -75,6 +75,13 @@ class SAT(service.Service):
|
|||
|
||||
def get_const(self, name):
|
||||
"""Return a constant"""
|
||||
try:
|
||||
_const = os.environ['SAT_CONST_%s' % name]
|
||||
if _const:
|
||||
debug(_("Constant %(name)s overrided with [%(value)s]") % {'name':name, 'value': _const})
|
||||
return _const
|
||||
except KeyError:
|
||||
pass
|
||||
if not CONST.has_key(name):
|
||||
error(_('Trying to access an undefined constant'))
|
||||
raise Exception
|
||||
|
|
|
|||
Loading…
Reference in a new issue