From Dan Kenigsberg danken@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: