From 5703d8ab15bd21f6573c92dcc319962c33867874 Mon Sep 17 00:00:00 2001 From: runsisi Date: Wed, 15 Mar 2017 16:36:06 +0800 Subject: [PATCH] pybind: fix docstring for librbd Python binding Signed-off-by: runsisi --- src/pybind/rbd/rbd.pyx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index b4a1cd07f9f4b..56037bb0bdc5b 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -2333,7 +2333,7 @@ written." % (self.name, ret, length)) :type oncomplete: completion :param fadvise_flags: fadvise flags for this read :type fadvise_flags: int - :returns: str - the data read + :returns: :class:`Completion` - the completion object :raises: :class:`InvalidArgument`, :class:`IOError` """ @@ -2375,20 +2375,19 @@ written." % (self.name, ret, length)) Raises :class:`InvalidArgument` if part of the write would fall outside the image. - oncomplete will be called with the returned read value as - well as the completion: + oncomplete will be called with the completion: - oncomplete(completion, data_read) + oncomplete(completion) - :param offset: the offset to start reading at + :param data: the data to be written + :type data: bytes + :param offset: the offset to start writing at :type offset: int - :param length: how many bytes to read - :type length: int - :param oncomplete: what to do when the read is complete + :param oncomplete: what to do when the write is complete :type oncomplete: completion - :param fadvise_flags: fadvise flags for this read + :param fadvise_flags: fadvise flags for this write :type fadvise_flags: int - :returns: str - the data read + :returns: :class:`Completion` - the completion object :raises: :class:`InvalidArgument`, :class:`IOError` """