From cfb17e86592890701b9b18cfef35503f564df79c Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Sat, 9 Feb 2013 04:37:28 +0530 Subject: 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. with the wrapper functions. Change-Id: I770da878e83eda6b98e49d70193990406a2642a7 BUG: 887301 Signed-off-by: Mohammed Junaid Reviewed-on: http://review.gluster.org/4360 Reviewed-by: Peter Portante Tested-by: Gluster Build System Reviewed-by: Anand Avati --- ufo/gluster/swift/common/exceptions.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ufo/gluster/swift/common/exceptions.py (limited to 'ufo/gluster/swift/common/exceptions.py') 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 + -- cgit