From: Rishabh Dave Date: Wed, 19 Jun 2019 13:10:57 +0000 (+0530) Subject: ceph_volume_client: make UTF-8 encoding explicit X-Git-Tag: v15.1.0~2132^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c4385ebb351b39f00f498e8e804e10a8be00946d;p=ceph.git ceph_volume_client: make UTF-8 encoding explicit Make it explicit in the method to_bytes() that encoding is with UTF-8. Signed-off-by: Rishabh Dave --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 5a242934c02b..b9e1863fee8c 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -27,9 +27,9 @@ def to_bytes(param): Helper method that returns byte representation of the given parameter. ''' if isinstance(param, str): - return param.encode() + return param.encode('utf-8') else: - return str(param).encode() + return str(param).encode('utf-8') class RadosError(Exception): """