From 5106582fc7edae7f39161cf89e566c020fcfa0ce Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 16 May 2018 19:06:42 +0000 Subject: [PATCH] cephfs.pyx: add py3 compatibility Signed-off-by: Rishabh Dave --- src/pybind/cephfs/cephfs.pyx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx index 4983f2477f6..804196f6854 100644 --- a/src/pybind/cephfs/cephfs.pyx +++ b/src/pybind/cephfs/cephfs.pyx @@ -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): """ -- 2.39.5