From: John Spray Date: Tue, 29 Sep 2015 15:59:41 +0000 (+0100) Subject: pybind/cephfs: fix DirEntry helpers X-Git-Tag: v9.1.0~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f20f67e18c5b3e55012e9a9d6d6a584cc1859b5f;p=ceph.git pybind/cephfs: fix DirEntry helpers These were referring to constants incorrectly, would throw exception if called. Signed-off-by: John Spray --- diff --git a/src/pybind/cephfs.py b/src/pybind/cephfs.py index 7aad54e24445..df33da71baaf 100644 --- a/src/pybind/cephfs.py +++ b/src/pybind/cephfs.py @@ -156,13 +156,13 @@ class DirEntry(namedtuple('DirEntry', DT_REG = 0xA DT_LNK = 0xC def is_dir(self): - return self.d_type == DT_DIR + return self.d_type == self.DT_DIR def is_symbol_file(self): - return self.d_type == DT_LNK + return self.d_type == self.DT_LNK def is_file(self): - return self.d_type == DT_REG + return self.d_type == self.DT_REG StatResult = namedtuple('StatResult', ["st_dev", "st_ino", "st_mode", "st_nlink", "st_uid",