From ba02fa1b72527414616ca9dc8623fb50e8ea38ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 19 Jan 2016 11:36:48 +0100 Subject: [PATCH] hobo: create [options] section if necessary (#9696) --- wcs/ctl/check_hobos.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcs/ctl/check_hobos.py b/wcs/ctl/check_hobos.py index 26b8e27..acb0d82 100644 --- a/wcs/ctl/check_hobos.py +++ b/wcs/ctl/check_hobos.py @@ -277,6 +277,9 @@ class CmdCheckHobos(Command): config.add_section('hobo') config.set('hobo', 'timestamp', self.all_services.get('timestamp')) + if not 'options' in config.sections(): + config.add_section('options') + variables = {} api_secrets = {} for service in self.all_services.get('services', []): @@ -313,9 +316,6 @@ class CmdCheckHobos(Command): for key, value in api_secrets.items(): config.set('api-secrets', key, value) - if 'options' not in config.sections(): - config.add_section('options') - # add known services for service in self.all_services.get('services', []): if service.get('service-id') == 'fargo': -- 2.7.0.rc3