From 4b4f07a0398d00e81db8b6eac648ec25dbc7b7ee Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Thu, 20 Jan 2011 16:11:23 -0800 Subject: [PATCH] Additional utf-8 encoding fixes to deal with containers. --- bin/swift-account-audit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/swift-account-audit b/bin/swift-account-audit index c80a5ed49a..ac0f18c2c7 100755 --- a/bin/swift-account-audit +++ b/bin/swift-account-audit @@ -151,7 +151,7 @@ class Auditor(object): if name not in account_listing: consistent = False print " Container %s not in account listing!" % path - part, nodes = self.container_ring.get_nodes(account, name) + part, nodes = self.container_ring.get_nodes(account, name.encode('utf-8')) rec_d = {} responses = {} for node in nodes: @@ -161,7 +161,7 @@ class Auditor(object): node_id = node['id'] try: conn = http_connect(node['ip'], node['port'], node['device'], - part, 'GET', path, {}, + part, 'GET', path.encode('utf-8'), {}, 'format=json&marker=%s' % quote(marker.encode('utf-8'))) resp = conn.getresponse() if resp.status // 100 != 2: @@ -233,7 +233,7 @@ class Auditor(object): try: conn = http_connect(node['ip'], node['port'], node['device'], part, 'GET', path, {}, - 'format=json&marker=%s' % quote(marker)) + 'format=json&marker=%s' % quote(marker.encode('utf-8'))) resp = conn.getresponse() if resp.status // 100 != 2: self.account_not_found += 1