diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-12-30 21:28:43 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-12-30 21:28:43 +0000 |
commit | dfbb1807fb9ea041981193d05ada34da64afaeb2 (patch) | |
tree | 2c479fc38255445750d576cb8f040d3b57528845 /swiftclient | |
parent | d59af8cc8b3f5ddf846046dd11029b84db4828ea (diff) | |
parent | 49a80f734c5a4ec8cbc359c6fc8099ddfbdfc6ba (diff) | |
download | python-swiftclient-dfbb1807fb9ea041981193d05ada34da64afaeb2.tar.gz |
Merge "Change tests to use new CaptureOutput class."
Diffstat (limited to 'swiftclient')
-rw-r--r-- | swiftclient/multithreading.py | 3 | ||||
-rwxr-xr-x | swiftclient/shell.py | 2 |
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) |