data_source: fix check of configuration around signature_key
This commit is contained in:
parent
d7d8162e35
commit
18212be91c
|
@ -70,7 +70,9 @@ class Renderer(template.TemplateRenderer):
|
|||
if 'auth_mech' in source:
|
||||
if source['auth_mech'] not in ('hmac-sha1', 'hmac-sha256', 'oauth2'):
|
||||
yield 'unknown auth_mech {0!r}'.format(source['auth_mech'])
|
||||
if 'signature_key' not in source or not isinstance(source['signature_key']):
|
||||
if source['auth_mech'].startswith('hmac-') \
|
||||
and ('signature_key' not in source
|
||||
or not isinstance(source['signature_key'])):
|
||||
yield 'missing signature_key string'
|
||||
|
||||
def get_sources(self, context):
|
||||
|
|
Reference in New Issue