From 5f2b73c8ae292cf400b811f3b3f808be6019a60c Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 10 Mar 2015 17:04:59 -0400 Subject: 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 --- cloudinit/sources/DataSourceMAAS.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cloudinit/sources') diff --git a/cloudinit/sources/DataSourceMAAS.py b/cloudinit/sources/DataSourceMAAS.py index 53f097e6..c1a0eb61 100644 --- a/cloudinit/sources/DataSourceMAAS.py +++ b/cloudinit/sources/DataSourceMAAS.py @@ -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, -- cgit v1.2.3