upload-logs-swift: fix keystoneauth1 exceptions

Import keystoneauth1.exceptions to access the exceptions.  HttpError
also lives under "exceptions.http.", so update that reference.

Change-Id: I4afe8c9fc8239a31d62a2a1d09794211b5066472
This commit is contained in:
Ian Wienand 2019-08-21 09:55:16 +10:00
parent f075ededc4
commit 3e758a8790

View File

@ -45,7 +45,7 @@ import openstack
import requests
import requests.exceptions
import requestsexceptions
import keystoneauth1
import keystoneauth1.exceptions
from ansible.module_utils.basic import AnsibleModule
@ -694,7 +694,7 @@ def ansible_main():
delete_after=p.get('delete_after', 15552000),
prefix=p.get('prefix'),
public=p.get('public'))
except (keystoneauth1.exceptions.HTTPError,
except (keystoneauth1.exceptions.http.HTTPError,
requests.exceptions.RequestException) as e:
module.fail_json(
changed=False,