зеркало из https://github.com/mozilla/stoneridge.git
Some bug fixes for master
This commit is contained in:
Родитель
7b2d72225b
Коммит
4be4c7b98a
|
@ -13,9 +13,9 @@ import stoneridge
|
||||||
class StoneRidgeMaster(stoneridge.QueueListener):
|
class StoneRidgeMaster(stoneridge.QueueListener):
|
||||||
def setup(self, config):
|
def setup(self, config):
|
||||||
self.queues = {
|
self.queues = {
|
||||||
'broadband': stoneridge.QueueWriter(stoneridge.BROADBAND_QUEUE),
|
'broadband': stoneridge.QueueWriter(stoneridge.NETCONFIG_QUEUES['broadband']),
|
||||||
'umts': stoneridge.QueueWriter(stoneridge.UMTS_QUEUE),
|
'umts': stoneridge.QueueWriter(stoneridge.NETCONFIG_QUEUES['umts']),
|
||||||
'gsm': stoneridge.QueueWriter(stoneridge.GSM_QUEUE)
|
'gsm': stoneridge.QueueWriter(stoneridge.NETCONFIG_QUEUES['gsm'])
|
||||||
}
|
}
|
||||||
self.logdir = stoneridge.get_config('stoneridge', 'logs')
|
self.logdir = stoneridge.get_config('stoneridge', 'logs')
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
|
@ -106,7 +106,7 @@ def get_config(section, option, default=None):
|
||||||
val = _cp.get(section, option)
|
val = _cp.get(section, option)
|
||||||
logging.debug('found %s.%s, returning %s' % (section, option, val))
|
logging.debug('found %s.%s, returning %s' % (section, option, val))
|
||||||
return val
|
return val
|
||||||
except ConfigParser.NoSectionError, ConfigParser.NoOptionError as e:
|
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) as e:
|
||||||
logging.debug('unable to find %s.%s, returning default %s' %
|
logging.debug('unable to find %s.%s, returning default %s' %
|
||||||
(section, option, default))
|
(section, option, default))
|
||||||
return default
|
return default
|
||||||
|
@ -243,9 +243,10 @@ def get_buildid_suffix():
|
||||||
return _buildid_suffix
|
return _buildid_suffix
|
||||||
|
|
||||||
|
|
||||||
def run_process(*args, logger=logging):
|
def run_process(*args, **kwargs):
|
||||||
"""Run a python process under the stoneridge environment.
|
"""Run a python process under the stoneridge environment.
|
||||||
"""
|
"""
|
||||||
|
logger = kwargs.get('logger', logging)
|
||||||
procname = args[0]
|
procname = args[0]
|
||||||
command = [sys.executable] + args
|
command = [sys.executable] + args
|
||||||
logger.debug('Running %s' % (procname,))
|
logger.debug('Running %s' % (procname,))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче