summaryrefslogtreecommitdiffstats
path: root/ufo/gluster/swift/common/exceptions.py
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2013-02-09 04:37:28 +0530
committerPeter Portante <peter.portante@redhat.com>2013-04-29 16:35:57 -0400
commitcfb17e86592890701b9b18cfef35503f564df79c (patch)
treea7ce9fc98db9c52b72486a095d6a6de959edf449 /ufo/gluster/swift/common/exceptions.py
parent775492b49fc4e0e7a6103c9c1995116946aa113c (diff)
object-storage: Use the wrapper functions provided by fs_utils.py to make system calls.
The set of changes: * Unit test cases for fs_utils.py * Replaced os.path with os_path * Implemented wrapper functions do_write, do_chmod, etc in fs_utils.py * Replaced os.<sys-call> with the wrapper functions. Change-Id: I770da878e83eda6b98e49d70193990406a2642a7 BUG: 887301 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4360 Reviewed-by: Peter Portante <pportant@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'ufo/gluster/swift/common/exceptions.py')
-rw-r--r--ufo/gluster/swift/common/exceptions.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/ufo/gluster/swift/common/exceptions.py b/ufo/gluster/swift/common/exceptions.py
new file mode 100644
index 0000000..d9357db
--- /dev/null
+++ b/ufo/gluster/swift/common/exceptions.py
@@ -0,0 +1,27 @@
+# Copyright (c) 2012 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class GlusterfsException(Exception):
+ pass
+
+class FileOrDirNotFoundError(GlusterfsException):
+ pass
+
+class NotDirectoryError(GlusterfsException):
+ pass
+
+class AlreadyExistsAsDir(GlusterfsException):
+ pass
+