From b111d50347076336b3e655178d967f8e5c8c9913 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Mon, 30 May 2016 15:08:48 +0530 Subject: 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 --- gluster/exceptions.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gluster/exceptions.py') 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 -- cgit