allow signature_key to be None (#15078)

This commit is contained in:
Frédéric Péters 2017-02-22 14:08:30 +01:00
parent bfbe8a5803
commit 6315bbd2fd
1 changed files with 3 additions and 1 deletions

View File

@ -195,7 +195,9 @@ class Data(object):
self.async = source.get('async', False)
self.timeout = source.get('timeout', 10)
self.auth_mech = source.get('auth_mech')
self.signature_key = source.get('signature_key').encode('ascii')
self.signature_key = None
if source.get('signature_key'):
self.signature_key = source.get('signature_key').encode('ascii')
self.parser_type = source.get('parser_type', 'raw')
self.content_type = source.get('content_type', self.MAPPING[self.parser_type])
self.user_context = source.get('user_context',