Change in vdsm[master]: jsonrpc: Fix callMethod in JsonRpcClient
smizrahi at redhat.com
smizrahi at redhat.com
Sun Dec 7 21:29:24 UTC 2014
Saggi Mizrahi has uploaded a new change for review.
Change subject: jsonrpc: Fix callMethod in JsonRpcClient
......................................................................
jsonrpc: Fix callMethod in JsonRpcClient
Change-Id: I7cf78f3b7f5d32c10339bbe6b49ce9b93662b4bb
Signed-off-by: Saggi Mizrahi <smizrahi at redhat.com>
---
M lib/yajsonrpc/__init__.py
1 file changed, 4 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/35935/1
diff --git a/lib/yajsonrpc/__init__.py b/lib/yajsonrpc/__init__.py
index b03151f..8320cd6 100644
--- a/lib/yajsonrpc/__init__.py
+++ b/lib/yajsonrpc/__init__.py
@@ -304,17 +304,14 @@
self._transport.connect()
def callMethod(self, methodName, params=[], rid=None):
- return self.call(JsonRpcRequest(methodName, params, rid))
-
- def call(self, req):
- resp = self.call_batch([req])[0]
- if "error" in resp:
+ resp = self.call(JsonRpcRequest(methodName, params, rid))[0]
+ if resp.error:
raise JsonRpcError(resp.error['code'], resp.error['message'])
return resp.result
- def call_batch(self, *reqs):
- call = self.call_async(reqs)
+ def call(self, *reqs):
+ call = self.call_async(*reqs)
call.wait()
return call.responses
--
To view, visit http://gerrit.ovirt.org/35935
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cf78f3b7f5d32c10339bbe6b49ce9b93662b4bb
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