]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/cephfs: fix DirEntry helpers 6115/head 6116/head
authorJohn Spray <john.spray@redhat.com>
Tue, 29 Sep 2015 15:59:41 +0000 (16:59 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 29 Sep 2015 21:40:59 +0000 (22:40 +0100)
These were referring to constants incorrectly, would
throw exception if called.

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/cephfs.py

index 7aad54e24445021a396727ce17deed97f3b2c821..df33da71baaf2eb76d1dadb0e86ffee575804da8 100644 (file)
@@ -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",