Change in vdsm[master]: exception: Inherit from VdsmException

nsoffer at redhat.com nsoffer at redhat.com
Fri Nov 20 20:00:55 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: exception: Inherit from VdsmException
......................................................................

exception: Inherit from VdsmException

All exceptions used by vdsm API inherit now from VdsmException, removing
duplicate code for generating response.

Change-Id: I25ffdd531fc9878a6762e2c0f670134b3aedf9a0
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M lib/vdsm/exception.py
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/48869/1

diff --git a/lib/vdsm/exception.py b/lib/vdsm/exception.py
index 98038e3..ae8e518 100644
--- a/lib/vdsm/exception.py
+++ b/lib/vdsm/exception.py
@@ -35,7 +35,7 @@
         return {'status': {'code': self.code, 'message': str(self)}}
 
 
-class GeneralException(Exception):
+class GeneralException(VdsmException):
     code = 100
     message = "General Exception"
 
@@ -44,9 +44,6 @@
 
     def __str__(self):
         return "%s: %s" % (self.message, repr(self.value))
-
-    def response(self):
-        return {'status': {'code': self.code, 'message': str(self)}}
 
 
 class ActionStopped(GeneralException):


-- 
To view, visit https://gerrit.ovirt.org/48869
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25ffdd531fc9878a6762e2c0f670134b3aedf9a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list