Change in vdsm[master]: stomp: dispatcher can return empty string

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Wed May 4 08:07:52 UTC 2016


Piotr Kliczewski has uploaded a new change for review.

Change subject: stomp: dispatcher can return empty string
......................................................................

stomp: dispatcher can return empty string

Based on logs provided for BZ I see that dispatcher#recv can return an
empty string which makes parser not to process message and as a result
we get:

exceptions.AttributeError: 'NoneType' object has no attribute 'command'

We need to make sure that we do not attempt to parse the data.


Change-Id: Id2d3553db1b1c7ca86bd0a12a70de6d798fea906
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
Bug-Url: https://bugzilla.redhat.com/1321325
---
M lib/yajsonrpc/stomp.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/56996/1

diff --git a/lib/yajsonrpc/stomp.py b/lib/yajsonrpc/stomp.py
index cd1ca06..48b54ba 100644
--- a/lib/yajsonrpc/stomp.py
+++ b/lib/yajsonrpc/stomp.py
@@ -358,7 +358,7 @@
             except socket.error:
                 dispatcher.handle_error()
                 return
-            if data is None:
+            if data is None or data == '':
                 return
             parser.parse(data)
             todo = pending()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2d3553db1b1c7ca86bd0a12a70de6d798fea906
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>


More information about the vdsm-patches mailing list