9aa52eecb5193e145ec9b396f105b085fb87a456

If you use the API and supply only preauth values (preauthurl and preauthtoken), and if either of these are incorrect, a non-descriptive AttributeError will be thrown and uncaught: 'NoneType' object has no attribute 'find' The _retry() will fail on the first pass (getting 401), then try to reauthenticate with non-preauth values. If those are not given, particularly the auth url, then the urlparse() call will be supplied None for the url in http_connection() causing the exception above. This change makes sure that we have an auth url, user and key before retrying authentication. Given the situation above, a '401 Unauthorized' ClientException will now be thrown instead of the AttributeError. Change-Id: Ie1b5bde1e8ff321aa18c0f23dbd2960d6e482236
Python bindings to the OpenStack Object Storage API
This is a python client for the Swift API. There's a Python API (the
swiftclient
module), and a command-line script
(swift
).
Development takes place via the usual OpenStack processes as outlined in the OpenStack wiki. The master repository is on GitHub.
This code is based on original the client previously included with OpenStack's swift The python-swiftclient is licensed under the Apache License like the rest of OpenStack.
Contents:
Description
Languages
Python
99.9%
Shell
0.1%