diff options
| author | Chad Smith <chad.smith@canonical.com> | 2017-10-06 13:22:54 -0600 |
|---|---|---|
| committer | Chad Smith <chad.smith@canonical.com> | 2017-10-06 13:22:54 -0600 |
| commit | 9fd022780ae516df3499b17b2d69b72fc502917c (patch) | |
| tree | bc33ac6296f374414ccb15dce233a4293b8633d3 /cloudinit/url_helper.py | |
| parent | 89630a6658c099d59f2766493a35c2ad266a8f42 (diff) | |
| parent | 45d361cb0b7f5e4e7d79522bd285871898358623 (diff) | |
| download | vyos-cloud-init-9fd022780ae516df3499b17b2d69b72fc502917c.tar.gz vyos-cloud-init-9fd022780ae516df3499b17b2d69b72fc502917c.zip | |
merge from master at 17.1-17-g45d361cb
Diffstat (limited to 'cloudinit/url_helper.py')
| -rw-r--r-- | cloudinit/url_helper.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py index 7cf76aae..0e0f5b4c 100644 --- a/cloudinit/url_helper.py +++ b/cloudinit/url_helper.py @@ -17,7 +17,6 @@ import time from email.utils import parsedate from functools import partial -import oauthlib.oauth1 as oauth1 from requests import exceptions from six.moves.urllib.parse import ( @@ -488,6 +487,11 @@ class OauthUrlHelper(object): def oauth_headers(url, consumer_key, token_key, token_secret, consumer_secret, timestamp=None): + try: + import oauthlib.oauth1 as oauth1 + except ImportError: + raise NotImplementedError('oauth support is not available') + if timestamp: timestamp = str(timestamp) else: |
