diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-02-02 08:30:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-02-02 08:30:40 +0000 |
commit | 21473f1bc475fa69aa9d1cdd6b60cc827c4f7f1b (patch) | |
tree | a644c4ca51a352f11bf16d4ccfd2c7a90bc0f14d /swiftclient/multithreading.py | |
parent | eef91b35139411fcef31855ce0ebe4407a2de70b (diff) | |
parent | 9593d4b58a5e9f240e26d7873d3cc251c7d51f71 (diff) | |
download | python-swiftclient-21473f1bc475fa69aa9d1cdd6b60cc827c4f7f1b.tar.gz |
Merge "Fix cross account upload using --os-storage-url"
Diffstat (limited to 'swiftclient/multithreading.py')
-rw-r--r-- | swiftclient/multithreading.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/swiftclient/multithreading.py b/swiftclient/multithreading.py index ade0f7b..6e7f143 100644 --- a/swiftclient/multithreading.py +++ b/swiftclient/multithreading.py @@ -96,10 +96,16 @@ class OutputManager(object): item = item.encode('utf8') print(item, file=stream) - def _print_error(self, item): - self.error_count += 1 + def _print_error(self, item, count=1): + self.error_count += count return self._print(item, stream=self.error_stream) + def warning(self, msg, *fmt_args): + # print to error stream but do not increment error count + if fmt_args: + msg = msg % fmt_args + self.error_print_pool.submit(self._print_error, msg, count=0) + class MultiThreadingManager(object): """ |