OpenStack Storage (Swift) Client
5ae4b42392
The extant default of zero is a bit counterintuitive; insufficiently-careful programmers using swiftclient in their application might, without carefully reading the source or documentation, write buggy code based on the assumption that the `http_status` attribute is absent or defaults to None if ClientException is raised for reasons other than to indicate an unsuccessful HTTP request. (However improbable this scenario may seem, the present author can sadly attest to it having actually happened at least once.) Just changing the default would break some tests on Python 3, due to the `500 <= err.http_status <= 599` comparison in Connection's _retry method (NoneType and int are not orderable in the Python 3.x series); thus, the case where http_status is None is explicitly folded into a code branch that logs and reraises (whereas previously it would have fallen through to an `else` branch where it would be logged and reraised just the same). While we're here, we might as well make ClientException's __init__ use super() (although admittedly the kinds of multiple-inheritance scenarios in which `super` truly shines seem unlikely to occur here). Change-Id: I8c02bfb4a0ef059e781be5e08fcde13fb1be5b88 |
||
---|---|---|
bin | ||
doc | ||
swiftclient | ||
tests | ||
.coveragerc | ||
.functests | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.testr.conf | ||
.unittests | ||
CONTRIBUTING.md | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
requirements.txt | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
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
).
You can find the documentation online.
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: