Actions
Bug #2909
closedthe rados_trunc function did not get implemented in rados.py Python
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
This code seems to work in the Ioctx class:
def trunc(self,key,size):
self.require_ioctx_open()
if not isinstance(key, str):
raise TypeError('key must be a string')
ret = self.librados.rados_trunc(self.io,c_char_p(key),c_size_t(size))
if ret < 0:
raise make_ex(ret, "Ioctx.trunc(%s): failed to truncate %s" % (self.name, key))
return ret
Updated by Josh Durgin over 11 years ago
- Source changed from Community (user) to Community (dev)
That looks good to me. Can I add your signed-off-by to the patch?
Updated by Josh Durgin over 11 years ago
- Status changed from New to Resolved
Thanks! Added in 43291951fad241a6d3f8b8daa37d3665c9d842d6, with a simple test and spacing normalized to the rest of the file.
Actions