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:
Scott Moser
2015-03-10 17:04:59 -04:00
parent 016b30fb67
commit a6ec13f9a7

View File

@@ -282,6 +282,11 @@ def check_seed_contents(content, seed):
def oauth_headers(url, consumer_key, token_key, token_secret, consumer_secret,
timestamp=None):
if timestamp:
timestamp = str(timestamp)
else:
timestamp = None
client = oauth1.Client(
consumer_key,
client_secret=consumer_secret,