summaryrefslogtreecommitdiffstats
path: root/gluster
diff options
context:
space:
mode:
authorThiago da Silva <thiago@redhat.com>2014-03-26 14:57:55 -0400
committerChetan Risbud <crisbud@redhat.com>2014-03-27 03:14:32 -0700
commitb00a99673233b8fe0a93c6f9095b435cb2569330 (patch)
treee68cef130b31100d205749122d1003e8a32d2b33 /gluster
parent7af0525a00a1d7baf03cbf863dcd681e253d54d0 (diff)
removing exception handling in do_mkdir
This change is being made to allow callers to handle any exception thrown by os.mkdir. This function is currently never called anywhere in the code. It was introduced as part of the first commit to this project but it was never used. This patch (http://review.gluster.org/#/c/5304/) removed the early version of this function, and this patch (http://review.gluster.org/#/c/5305/) added it back with new exception handling. Change-Id: I71325660cb47594b0804da3da21920e26d2055f2 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/7350 Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
Diffstat (limited to 'gluster')
-rw-r--r--gluster/swift/common/fs_utils.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/gluster/swift/common/fs_utils.py b/gluster/swift/common/fs_utils.py
index 03c5a77..a93fa6b 100644
--- a/gluster/swift/common/fs_utils.py
+++ b/gluster/swift/common/fs_utils.py
@@ -105,17 +105,7 @@ def do_ismount(path):
def do_mkdir(path):
- try:
- os.mkdir(path)
- except OSError as err:
- if err.errno == errno.EEXIST:
- logging.warn("fs_utils: os.mkdir - path %s already exists", path)
- elif err.errno in (errno.ENOSPC, errno.EDQUOT):
- do_log_rl("do_mkdir(%s) failed: %s", path, err)
- raise DiskFileNoSpace()
- else:
- raise GlusterFileSystemOSError(
- err.errno, '%s, os.mkdir("%s")' % (err.strerror, path))
+ os.mkdir(path)
def do_listdir(path):