From: Rishabh Dave Date: Wed, 17 Jul 2019 09:56:42 +0000 (+0530) Subject: ceph_volume_client: don't convert None to str object X-Git-Tag: v15.1.0~2132^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f290322f90ba630096be392a027d03516d470360;p=ceph.git ceph_volume_client: don't convert None to str object Fixes: http://tracker.ceph.com/issues/40800 Signed-off-by: Rishabh Dave --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 67f3a689ad92..cfd54a5d172b 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -28,6 +28,8 @@ def to_bytes(param): ''' if isinstance(param, str): return param.encode('utf-8') + elif param is None: + return param else: return str(param).encode('utf-8')