summaryrefslogtreecommitdiff
path: root/swiftclient/multithreading.py
diff options
context:
space:
mode:
authorJoel Wright <joel.wright@sohonet.com>2015-01-14 11:10:48 +0000
committerJoel Wright <joel.wright@sohonet.com>2015-02-17 14:52:35 +0000
commitcac21e3cff323d828b69b2280151b9c505bdaeda (patch)
tree7435e633f138ed563d08cdd546e6df07da808039 /swiftclient/multithreading.py
parent06c73c6020e5af873e3ce245a27035da3448de7b (diff)
downloadpython-swiftclient-cac21e3cff323d828b69b2280151b9c505bdaeda.tar.gz
Fix crash when stat'ing objects with non-ascii names
This patch fixes a crash and stack trace in stat when an object name contains non-ascii characters. Change-Id: Ib6dc686771e593243de56cafc100b17e51d9d9d5 Closes-Bug: 1411665
Diffstat (limited to 'swiftclient/multithreading.py')
-rw-r--r--swiftclient/multithreading.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/swiftclient/multithreading.py b/swiftclient/multithreading.py
index 7ae82fa..32d8ffa 100644
--- a/swiftclient/multithreading.py
+++ b/swiftclient/multithreading.py
@@ -84,13 +84,11 @@ class OutputManager(object):
self.print_pool.submit(self._print, msg)
def print_items(self, items, offset=DEFAULT_OFFSET, skip_missing=False):
- lines = []
template = '%%%ds: %%s' % offset
for k, v in items:
if skip_missing and not v:
continue
- lines.append((template % (k, v)).rstrip())
- self.print_msg('\n'.join(lines))
+ self.print_msg((template % (k, v)).rstrip())
def error(self, msg, *fmt_args):
if fmt_args: