check_hobos: configure fargo_url if a fargo service is available (#6985)
This commit is contained in:
parent
cfbc30470b
commit
e232eb75d7
|
@ -185,6 +185,15 @@ class CmdCheckHobos(Command):
|
|||
value = unicode(value).encode('utf-8')
|
||||
config.set('variables', key, value)
|
||||
|
||||
if 'options' not in config.sections()
|
||||
config.add_section('options')
|
||||
for service in self.all_services.get('services', []):
|
||||
if service.get('service-id') != 'fargo':
|
||||
continue
|
||||
config.set('options', 'fargo_url', service.get('base_url'))
|
||||
# Use the first fargo found and stop
|
||||
break
|
||||
|
||||
with open(site_options_filepath, 'wb') as site_options:
|
||||
config.write(site_options)
|
||||
|
||||
|
|
Loading…
Reference in New Issue