summaryrefslogtreecommitdiff
path: root/swiftclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-12-30 21:28:43 +0000
committerGerrit Code Review <review@openstack.org>2014-12-30 21:28:43 +0000
commitdfbb1807fb9ea041981193d05ada34da64afaeb2 (patch)
tree2c479fc38255445750d576cb8f040d3b57528845 /swiftclient
parentd59af8cc8b3f5ddf846046dd11029b84db4828ea (diff)
parent49a80f734c5a4ec8cbc359c6fc8099ddfbdfc6ba (diff)
downloadpython-swiftclient-dfbb1807fb9ea041981193d05ada34da64afaeb2.tar.gz
Merge "Change tests to use new CaptureOutput class."
Diffstat (limited to 'swiftclient')
-rw-r--r--swiftclient/multithreading.py3
-rwxr-xr-xswiftclient/shell.py2
2 files changed, 4 insertions, 1 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
diff --git a/swiftclient/shell.py b/swiftclient/shell.py
index 8d4da67..d58de60 100755
--- a/swiftclient/shell.py
+++ b/swiftclient/shell.py
@@ -1303,7 +1303,7 @@ Examples:
except (ClientException, RequestException, socket.error) as err:
output.error(str(err))
- if output.error_count > 0:
+ if output.get_error_count() > 0:
exit(1)