зеркало из 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):
|
||||
def setup(self, config):
|
||||
self.queues = {
|
||||
'broadband': stoneridge.QueueWriter(stoneridge.BROADBAND_QUEUE),
|
||||
'umts': stoneridge.QueueWriter(stoneridge.UMTS_QUEUE),
|
||||
'gsm': stoneridge.QueueWriter(stoneridge.GSM_QUEUE)
|
||||
'broadband': stoneridge.QueueWriter(stoneridge.NETCONFIG_QUEUES['broadband']),
|
||||
'umts': stoneridge.QueueWriter(stoneridge.NETCONFIG_QUEUES['umts']),
|
||||
'gsm': stoneridge.QueueWriter(stoneridge.NETCONFIG_QUEUES['gsm'])
|
||||
}
|
||||
self.logdir = stoneridge.get_config('stoneridge', 'logs')
|
||||
self.config = config
|
||||
|
|
|
@ -106,7 +106,7 @@ def get_config(section, option, default=None):
|
|||
val = _cp.get(section, option)
|
||||
logging.debug('found %s.%s, returning %s' % (section, option, 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' %
|
||||
(section, option, default))
|
||||
return default
|
||||
|
@ -243,9 +243,10 @@ def get_buildid_suffix():
|
|||
return _buildid_suffix
|
||||
|
||||
|
||||
def run_process(*args, logger=logging):
|
||||
def run_process(*args, **kwargs):
|
||||
"""Run a python process under the stoneridge environment.
|
||||
"""
|
||||
logger = kwargs.get('logger', logging)
|
||||
procname = args[0]
|
||||
command = [sys.executable] + args
|
||||
logger.debug('Running %s' % (procname,))
|
||||
|
|
Загрузка…
Ссылка в новой задаче