hobo: handle services without a secret key (#7192)

This commit is contained in:
Frédéric Péters 2015-05-22 13:28:34 +02:00
parent 3493e2fbe2
commit bf88dfebc6
1 changed files with 2 additions and 0 deletions

View File

@ -239,6 +239,8 @@ class CmdCheckHobos(Command):
api_secrets = {}
for service in self.all_services.get('services', []):
variables['%s_url' % service.get('slug')] = service.get('base_url')
if not service.get('secret_key'):
continue
domain = urlparse.urlparse(service.get('base_url')).netloc.split(':')[0]
api_secrets[domain] = hashlib.sha1(domain + service.get('secret_key')).hexdigest()
if self.all_services.get('variables'):