DataSourceMAAS: fix timestamp error in oauthlib
oddly enough, the timestamp you pass into oauthlib must be a None or a string. If not, raises ValueError: Only unicode objects are escapable. Got 1426021488 of type <class 'int'>
This commit is contained in:
@@ -282,6 +282,11 @@ def check_seed_contents(content, seed):
|
|||||||
|
|
||||||
def oauth_headers(url, consumer_key, token_key, token_secret, consumer_secret,
|
def oauth_headers(url, consumer_key, token_key, token_secret, consumer_secret,
|
||||||
timestamp=None):
|
timestamp=None):
|
||||||
|
if timestamp:
|
||||||
|
timestamp = str(timestamp)
|
||||||
|
else:
|
||||||
|
timestamp = None
|
||||||
|
|
||||||
client = oauth1.Client(
|
client = oauth1.Client(
|
||||||
consumer_key,
|
consumer_key,
|
||||||
client_secret=consumer_secret,
|
client_secret=consumer_secret,
|
||||||
|
|||||||
Reference in New Issue
Block a user