fix urls signing key (#8109)

This commit is contained in:
Serghei Mihai 2015-07-30 18:10:38 +02:00
parent df0a73a08e
commit 2b77f08c17
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ def sign_query(query, key, algo='sha256', timestamp=None, nonce=None):
def sign_string(s, key, algo='sha256', timedelta=30):
digestmod = getattr(hashlib, algo)
hash = hmac.HMAC(key, digestmod=digestmod, msg=s)
hash = hmac.HMAC(str(key), digestmod=digestmod, msg=s)
return hash.digest()
def ellipsize(text, length=50):