summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFlaper Fesp <flaper87@gmail.com>2013-02-27 14:47:44 +0100
committerFlaper Fesp <flaper87@gmail.com>2013-03-29 13:50:48 +0100
commit03a4806d972ac150e717451566e9c4c35a141d8f (patch)
treeb5079ee0b75eb9d184449913ac71691ba7a4f6c0 /doc
parent7369310622224073ecbef4ab84a48c2a873a56b9 (diff)
downloadpython-cinderclient-1.0.3.tar.gz
Decodes input and encodes output1.0.3
Currently cinderclient doesn't handle properly incoming and outgoing encode / decode process. As a solution for this, this patch implements a decoding process for all data incoming from the user side and encodes everything going out of the client, i.e: http requests, prints, etc. This patch introduces a new module (strutils.py) taken from oslo-incubator in order to use 2 of the functions present in it: About safe_(decode|encode): Both functions try to encode / decode the incoming text using the stdin encoding, fallback to python's default encoding if that returns None or to UTF-8 as the last option. In both functions only basestring objects are accepted and they both raise TypeError if an object of another type is passed. About the general cinderclient changes: In order to better support non-ASCII characters, it is a good practice to use unicode interanlly and encode everything that has to go out. This patch aims to do that and introduces this behaviour in the client. Testing: A good test (besides using tox) is to use cinder client with and without setting any locale (export LANG=). Fixes bug: 1130572 Change-Id: Idb7d06954c29e003f68a0c4aa0b80ecc7017cbc9
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions