summaryrefslogtreecommitdiff
path: root/swiftclient/utils.py
diff options
context:
space:
mode:
authorDarrell Bishop <darrell@swiftstack.com>2013-06-26 22:47:49 -0700
committerDarrell Bishop <darrell@swiftstack.com>2013-07-28 22:08:17 -0700
commit9198e95468b3005730c931da1701f34b1a9ce2d9 (patch)
treed6034f1a489b67273c19dc43221b142bd0c7bb65 /swiftclient/utils.py
parent5d9c6f845cc98da720fea7e2343fdbb0db9a42a5 (diff)
downloadpython-swiftclient-9198e95468b3005730c931da1701f34b1a9ce2d9.tar.gz
Move multi-threading code to a library.
This patch extracts the multi-threading code from bin/swift into swiftclient/multithreading and adds tests. In particular, this new way of doing it (with context managers) will prevent non-daemonic threads from wedging the process when unexpected exceptions happen. I enabled reporting of which lines, specifically, are not covered by unit tests (added -m option to "coverage report" in .unittests). This patch includes a drive-by fix for uploading a segmented file with --use-slo when that object already exists. A key of "name" was used instead of "path", raising KeyError. There's also another drive-by fix for uploading segmented objects with --use-slo. Commit 874e0e4427b80e1b15b74a1557b73ba9d61443ca regressed this by removing the capturing of thread-worker results in QueueFunctionThread.run(). This patch restores that functionality and the feature (uploading SLO objects). Change-Id: I0b4f677e4a734e83d1a25088d9a74f7d46384e53
Diffstat (limited to 'swiftclient/utils.py')
-rw-r--r--swiftclient/utils.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/swiftclient/utils.py b/swiftclient/utils.py
index f309d29..33d89a5 100644
--- a/swiftclient/utils.py
+++ b/swiftclient/utils.py
@@ -12,7 +12,6 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
"""Miscellaneous utility functions for use with Swift."""
TRUE_VALUES = set(('true', '1', 'yes', 'on', 't', 'y'))