Change in vdsm[master]: jsonrpc: handle timeout in callMethod

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Wed Jul 8 09:07:53 UTC 2015


Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: handle timeout in callMethod
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/43167/1/lib/yajsonrpc/__init__.py
File lib/yajsonrpc/__init__.py:

Line 335:         if response.error:
Line 336:             raise JsonRpcError(response.error['code'],
Line 337:                                response.error['message'])
Line 338: 
Line 339:         return response.result
> I think it's better to do it in 'call'.
There is an advantage in using callMethod it provides you additional logic around response handling.

This patch fixes the issue when we do not get any response. The code was broken for this use case so we have this fix.
Line 340: 
Line 341:     def call(self, *reqs, **kwargs):
Line 342:         call = self.call_async(*reqs)
Line 343:         call.wait(kwargs.get('timeout', CALL_TIMEOUT))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I28dd33c9ff64962747b5592f9e373d3f81112186
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list