From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: pylint: Check whether message was parsed to a dict
......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/76014/2/lib/yajsonrpc/stompreactor.py
File lib/yajsonrpc/stompreactor.py:
Line 321: """
Line 322: def send(self, message, destination=stomp.SUBSCRIPTION_ID_RESPONSE):
Line 323: resp = json.loads(message)
Line 324: if not isinstance(resp, dict):
Line 325: raise ValueError(
This won't get propagated to the client side. If the message is
not correct
pylint is simply not smart enough to tell that after line 325,
'resp' is necessarily a dict. When it imported json.loads() it realized that it
might return a boolean, so it complains. I don't think we have a choice but to silence
pylint.
Line 326: 'Provided message %s failed parsing to dictionary' %
message)
Line 327: response_id = resp.get("id")
Line 328:
Line 329: try:
--
To view, visit
https://gerrit.ovirt.org/76014
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0570054ac7ea83e54ee366b35a43c9d7b3cc42c8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes