Project

General

Profile

Bug #5528

Python bindings Object.get_xattrs() requires unnecessary xattr_name

Added by Johannes Erdfelt over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
librados
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

get_xattrs() returns all xattrs for an object, but Object.get_xattrs() requires an xattr_name. This differs than Ioctx.get_xattrs(). As a result, attempting to pass anything as the xattr_name to Object.get_xattrs() will end up calling Ioctx.get_xattrs() incorrectly and result in a traceback:

Traceback (most recent call last):
File "/home/johannes/virtualenvs/ceph/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/johannes/ceph/src/test/pybind/test_rados.py", line 128, in test_obj_xattrs
for key, value in obj.get_xattrs():
File "/home/johannes/virtualenvs/ceph/lib/python2.7/site-packages/rados.py", line 1515, in retfunc
return func(self, *args, **kwargs)
TypeError: get_xattrs() takes exactly 2 arguments (1 given)

History

#1 Updated by Ian Colle over 10 years ago

  • Assignee set to Dan Mick

#2 Updated by Josh Durgin over 10 years ago

  • Category set to librados
  • Status changed from New to Resolved
  • Assignee changed from Dan Mick to Johannes Erdfelt

Also available in: Atom PDF