From 60a9ebaba73b2154ce841d36978e317197b66945 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 25 Aug 2015 15:03:35 -0400 Subject: MAAS: fixes to data source and OauthUrlHelper the previous version was broken. The vital fixes here are: * adding parsedate and oauth1 imports to url_helper * fix skew_data usage intending to use self.skew_data Additionally: * reorder imports in url_helper * fixes to python3 -m cloudinit.sources.DataSourceMaas LP: #1488507 --- cloudinit/url_helper.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cloudinit/url_helper.py') diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py index dca4cc85..ce6b5444 100644 --- a/cloudinit/url_helper.py +++ b/cloudinit/url_helper.py @@ -20,16 +20,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import time - +import json +import os +import requests import six +import time -import requests -import oauthlib.oauth1 as oauth1 -import os -import json +from email.utils import parsedate from functools import partial from requests import exceptions +import oauthlib.oauth1 as oauth1 from six.moves.urllib.parse import ( urlparse, urlunparse, @@ -434,7 +434,7 @@ class OauthUrlHelper(object): if abs(old_skew - skew) > self.skew_change_limit: self.update_skew_file(host, skew) LOG.warn("Setting oauth clockskew for %s to %d", host, skew) - skew_data[host] = skew + self.skew_data[host] = skew return -- cgit v1.2.3