From: Colin Patrick McCabe Date: Wed, 25 May 2011 22:48:31 +0000 (-0700) Subject: pybind/rados: correctly return data with NULLs X-Git-Tag: v0.29~27^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b76874f681ec44a67a3902a01ae350476b87ed92;p=ceph.git pybind/rados: correctly return data with NULLs Correctly handle returning data with embedded NULLs in it. Signed-off-by: Colin McCabe --- diff --git a/src/pybind/rados.py b/src/pybind/rados.py index 43582c5d149..b4d663aab91 100755 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -383,7 +383,7 @@ written." % (self.name, ret, length)) c_size_t(length), c_uint64(offset)) if ret < 0: raise make_ex("Ioctx.read(%s): failed to read %s" % (self.name, key)) - return ret_buf.value + return ctypes.string_at(ret_buf, ret) def get_stats(self): self.require_ioctx_open()