summaryrefslogtreecommitdiffstats
path: root/gluster/exceptions.py
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2016-05-30 15:08:48 +0530
committerPrashanth Pai <ppai@redhat.com>2016-06-15 15:02:18 +0530
commitb111d50347076336b3e655178d967f8e5c8c9913 (patch)
treeb4ad1944d0379f560fae379efd27d69e7c12eb65 /gluster/exceptions.py
parent759471ddcd76306b952bb2ee28f211afc9e24f3a (diff)
Add validation decorators
As glfs and glfd are pointers to memory locations, passing invalid values of glfs and glfd to the libgfapi C library can result in segfault. This patch introduces decorators that validate glfs and glfd before calling correspoding C APIs. Change-Id: I4e86bd8e436e23cd41f75f428d246939c820bb9c Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'gluster/exceptions.py')
-rw-r--r--gluster/exceptions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gluster/exceptions.py b/gluster/exceptions.py
index 2bb4732..962e69f 100644
--- a/gluster/exceptions.py
+++ b/gluster/exceptions.py
@@ -16,3 +16,7 @@
class LibgfapiException(Exception):
pass
+
+
+class VolumeNotMounted(LibgfapiException):
+ pass