Merge pull request #8331 from sileht/sileht/rados-cython

pybind/rados: python3 fix

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
Josh Durgin 2016-03-30 09:20:19 -07:00
commit 823683c2f7
2 changed files with 3 additions and 3 deletions

View File

@ -2025,7 +2025,7 @@ cdef class Ioctx(object):
:raises: IoctxStateError
"""
if self.state != b"open":
if self.state != "open":
raise IoctxStateError("The pool is %s" % self.state)
def change_auid(self, auid):

View File

@ -448,12 +448,12 @@ class TestIoctx(object):
with ReadOpCtx(self.ioctx) as read_op:
iter, ret = self.ioctx.get_omap_vals(read_op, "", "", 4)
self.ioctx.operate_read_op(read_op, "hw")
iter.next()
next(iter)
eq(list(iter), [("2", b"bbb"), ("3", b"ccc"), ("4", b"\x04\x04\x04\x04")])
with ReadOpCtx(self.ioctx) as read_op:
iter, ret = self.ioctx.get_omap_vals(read_op, "2", "", 4)
self.ioctx.operate_read_op(read_op, "hw")
eq(("3", b"ccc"), iter.next())
eq(("3", b"ccc"), next(iter))
eq(list(iter), [("4", b"\x04\x04\x04\x04")])
with ReadOpCtx(self.ioctx) as read_op:
iter, ret = self.ioctx.get_omap_vals(read_op, "", "2", 4)