Change in vdsm[master]: jsonrpc: Properly initialize RuntimeError for JsonRpcError
smizrahi at redhat.com
smizrahi at redhat.com
Sun Dec 7 21:29:23 UTC 2014
Saggi Mizrahi has uploaded a new change for review.
Change subject: jsonrpc: Properly initialize RuntimeError for JsonRpcError
......................................................................
jsonrpc: Properly initialize RuntimeError for JsonRpcError
Without this the error doesn't have a proper message when printed\logged
Change-Id: Ic922a25e44ddc345d54dff19ffa6a93c461c1844
Signed-off-by: Saggi Mizrahi <smizrahi at redhat.com>
---
M lib/yajsonrpc/__init__.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/35934/1
diff --git a/lib/yajsonrpc/__init__.py b/lib/yajsonrpc/__init__.py
index dcfbbda..b03151f 100644
--- a/lib/yajsonrpc/__init__.py
+++ b/lib/yajsonrpc/__init__.py
@@ -33,6 +33,9 @@
def __init__(self, code, msg):
self.code = code
self.message = msg
+ super(RuntimeError, self).__init__(
+ "[%d] %s" % (self.code, self.message)
+ )
class JsonRpcParseError(JsonRpcError):
--
To view, visit http://gerrit.ovirt.org/35934
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic922a25e44ddc345d54dff19ffa6a93c461c1844
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
More information about the vdsm-patches
mailing list