From: Josh Durgin Date: Wed, 11 Jan 2012 20:20:47 +0000 (-0800) Subject: rados.py: avoid getting return value of void function X-Git-Tag: v0.40~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79085ad088b149593040ee0cfdc726e0d6ec7cb3;p=ceph.git rados.py: avoid getting return value of void function rados_ioctx_locator_set_key is void. The return value seems to have been uninitialized, so the tests failed rarely. Signed-off-by: Josh Durgin --- diff --git a/src/pybind/rados.py b/src/pybind/rados.py index 63eb3b847688..1adeaf410529 100755 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -540,11 +540,8 @@ class Ioctx(object): self.require_ioctx_open() if not isinstance(loc_key, str): raise TypeError('loc_key must be a string') - ret = self.librados.rados_ioctx_locator_set_key(self.io,\ + self.librados.rados_ioctx_locator_set_key(self.io,\ c_char_p(loc_key)) - if ret < 0: - raise make_ex(ret, "error changing locator key of '%s' to '%s'" %\ - (self.name, loc_key)) self.locator_key = loc_key def get_locator_key(self):