summaryrefslogtreecommitdiff
path: root/swiftclient/client.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-27 01:44:38 +0000
committerGerrit Code Review <review@openstack.org>2016-02-27 01:44:38 +0000
commitba2ff4a6ea93314e8c519f53ae97d8cb2f31928e (patch)
tree13504c80f96a806925ff923a6775ac46127c2ea1 /swiftclient/client.py
parent46d817828082105a69d4da53fef2f2fbefc54809 (diff)
parentaa0edd00966237163451fc44cda2c593a5215cbe (diff)
downloadpython-swiftclient-ba2ff4a6ea93314e8c519f53ae97d8cb2f31928e.tar.gz
Merge "Force header keys/values to bytes/unicode before coercing to unicode"
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r--swiftclient/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index f65d4bb..56f236c 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -169,6 +169,8 @@ def http_log(args, kwargs, resp, body):
def parse_header_string(data):
+ if not isinstance(data, (six.text_type, six.binary_type)):
+ data = str(data)
if six.PY2:
if isinstance(data, six.text_type):
# Under Python2 requests only returns binary_type, but if we get