diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-08-25 15:03:35 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-08-25 15:03:35 -0400 |
commit | 60a9ebaba73b2154ce841d36978e317197b66945 (patch) | |
tree | 54923e7fe54678468174ee00fb6ecee183309c4b /cloudinit/url_helper.py | |
parent | 827b7b903abc07d5fb04591bbae5587e6dc44993 (diff) | |
download | vyos-cloud-init-60a9ebaba73b2154ce841d36978e317197b66945.tar.gz vyos-cloud-init-60a9ebaba73b2154ce841d36978e317197b66945.zip |
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
Diffstat (limited to 'cloudinit/url_helper.py')
-rw-r--r-- | cloudinit/url_helper.py | 14 |
1 files changed, 7 insertions, 7 deletions
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 <http://www.gnu.org/licenses/>. -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 |