From f290322f90ba630096be392a027d03516d470360 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 17 Jul 2019 15:26:42 +0530 Subject: [PATCH] ceph_volume_client: don't convert None to str object Fixes: http://tracker.ceph.com/issues/40800 Signed-off-by: Rishabh Dave --- src/pybind/ceph_volume_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 67f3a689ad9..cfd54a5d172 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')