mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
cephfs.pyx: add py3 compatibility
Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit is contained in:
parent
efdf1af41d
commit
5106582fc7
@ -700,11 +700,13 @@ cdef class LibCephFS(object):
|
||||
if not dirent:
|
||||
return None
|
||||
|
||||
d_name = dirent.d_name if sys.version[0:2] == '2.' else dirent.d_name.\
|
||||
decode()
|
||||
return DirEntry(d_ino=dirent.d_ino,
|
||||
d_off=dirent.d_off,
|
||||
d_reclen=dirent.d_reclen,
|
||||
d_type=dirent.d_type,
|
||||
d_name=dirent.d_name)
|
||||
d_name=d_name)
|
||||
|
||||
def closedir(self, DirResult dir_handler):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user