summaryrefslogtreecommitdiff
path: root/swiftclient/multithreading.py
diff options
context:
space:
mode:
authorDaniel Wakefield <daniel.wakefield@hp.com>2014-12-04 16:59:11 +0000
committerDaniel Wakefield <daniel.wakefield@hp.com>2014-12-05 10:57:09 +0000
commit49a80f734c5a4ec8cbc359c6fc8099ddfbdfc6ba (patch)
tree547ff28038ee8f327720d9d5e9c978515249e893 /swiftclient/multithreading.py
parentd89e08f722f030925495a4180d2fe8422977841d (diff)
downloadpython-swiftclient-49a80f734c5a4ec8cbc359c6fc8099ddfbdfc6ba.tar.gz
Change tests to use new CaptureOutput class.
Added the ability to clear the buffers in the CaptureOutput class so it can be easily used multiple times in the same context manager. Also added a option to suppress the SystemExit associated with printing an error. Change-Id: Ib59bbbe88256f215eed0a8ebc8282e02181d4377
Diffstat (limited to 'swiftclient/multithreading.py')
-rw-r--r--swiftclient/multithreading.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/swiftclient/multithreading.py b/swiftclient/multithreading.py
index a2dcd71..ade0f7b 100644
--- a/swiftclient/multithreading.py
+++ b/swiftclient/multithreading.py
@@ -86,6 +86,9 @@ class OutputManager(object):
msg = msg % fmt_args
self.error_print_pool.submit(self._print_error, msg)
+ def get_error_count(self):
+ return self.error_count
+
def _print(self, item, stream=None):
if stream is None:
stream = self.print_stream