diff options
author | Mohammed Junaid <junaid@redhat.com> | 2013-02-09 04:37:28 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-11 18:00:56 -0800 |
commit | 311a5df884c0d2320dd43191e6e6ba0a033eb683 (patch) | |
tree | 5dfc1e91ba79565ce735453afb8d2d24d635501f /ufo/gluster/swift/common/exceptions.py | |
parent | 3b19a14b86f753a0465a11a89eaabf3e19f42eca (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.py | 27 |
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 00000000000..d9357dbb42f --- /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 + |