in python2, zip() returns a list. while in python3, zip() returns an
iterator. so we cannot slice the return value of zip(...) anymore. let's
just materialized the iterator before slicing it.
this change address the failure of
```
ERROR: test_rados.TestIoctx.test_applications
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "/var/ssd/ceph/src/test/pybind/test_rados.py", line 879, in
test_applications
eq([], self.ioctx.application_metadata_list("app1"))
File "rados.pyx", line 4074, in rados.Ioctx.application_metadata_list
TypeError: 'zip' object is unsliceable
```
Signed-off-by: Kefu Chai <kchai@redhat.com>
c_keys[:key_length].split(b'\0')]
vals = [decode_cstr(val) for val in
c_vals[:val_length].split(b'\0')]
- return zip(keys, vals)[:-1]
+ return list(zip(keys, vals))[:-1]
elif ret == -errno.ERANGE:
pass
else: