diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-03-10 17:04:59 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-03-10 17:04:59 -0400 |
commit | 5f2b73c8ae292cf400b811f3b3f808be6019a60c (patch) | |
tree | 7a26cbccc95d9e03515740e3019f479981c40436 | |
parent | ec23db8b0450c8f76305295bea5ec3178dd5f176 (diff) | |
download | vyos-cloud-init-5f2b73c8ae292cf400b811f3b3f808be6019a60c.tar.gz vyos-cloud-init-5f2b73c8ae292cf400b811f3b3f808be6019a60c.zip |
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'>
-rw-r--r-- | cloudinit/sources/DataSourceMAAS.py | 5 |
1 files changed, 5 insertions, 0 deletions
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, |