From dda911d7f139d32c1c9a4bdca8d4aaf5acf479ae Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Thu, 4 Sep 2014 16:32:40 +0530 Subject: Provide default mode for Volume.mkdir() Calling mkdir without mode used to fail with following error: >>> vol.mkdir('/c2') Traceback (most recent call last): File "", line 1, in TypeError: mkdir() takes exactly 3 arguments (2 given) Python's os.mkdir() defined default mode: https://docs.python.org/2/library/os.html#os.mkdir Also, changed mode_t is of type unsigned short (ctypes.c_ushort). Change-Id: I95e47a8173d90e2a162cfeb9af002ea0c20fc2ff Signed-off-by: Prashanth Pai --- glusterfs/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glusterfs/api.py') diff --git a/glusterfs/api.py b/glusterfs/api.py index fa3c9f7..6bc19ea 100755 --- a/glusterfs/api.py +++ b/glusterfs/api.py @@ -213,7 +213,7 @@ glfs_closedir = ctypes.CFUNCTYPE( glfs_mkdir = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p, ctypes.c_char_p, - ctypes.c_ulong)(('glfs_mkdir', client)) + ctypes.c_ushort)(('glfs_mkdir', client)) glfs_opendir = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, -- cgit