diff options
author | Prashanth Pai <ppai@redhat.com> | 2014-09-04 16:32:40 +0530 |
---|---|---|
committer | Prashanth Pai <ppai@redhat.com> | 2014-09-04 17:43:26 +0530 |
commit | dda911d7f139d32c1c9a4bdca8d4aaf5acf479ae (patch) | |
tree | f29627949682d2a0148621ca29177fa6401248bd /glusterfs/api.py | |
parent | ccd43c43ae79920422248e5413151de7c0ab08a3 (diff) |
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 "<stdin>", line 1, in <module>
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 <ppai@redhat.com>
Diffstat (limited to 'glusterfs/api.py')
-rwxr-xr-x | glusterfs/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
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, |