ceph_volume_client: don't convert None to str object

Fixes: http://tracker.ceph.com/issues/40800
Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit is contained in:
Rishabh Dave 2019-07-17 15:26:42 +05:30
parent 0d5c3a7de6
commit f290322f90

View File

@ -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')