Change in vdsm[master]: jsonrpc: ignore unknown message id

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Thu Jul 16 13:32:37 UTC 2015


Piotr Kliczewski has uploaded a new change for review.

Change subject: jsonrpc: ignore unknown message id
......................................................................

jsonrpc: ignore unknown message id


Change-Id: Ide306f44c8c42d6661932698307efa4ce163e90e
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
---
M lib/yajsonrpc/__init__.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/43746/1

diff --git a/lib/yajsonrpc/__init__.py b/lib/yajsonrpc/__init__.py
index 68af242..1dd1ae2 100644
--- a/lib/yajsonrpc/__init__.py
+++ b/lib/yajsonrpc/__init__.py
@@ -293,7 +293,11 @@
         self._responses.append(response)
 
     def requestDone(self, response):
-        del self._requests[response.id]
+        try:
+            del self._requests[response.id]
+        except KeyError:
+            # ignore when request had no id
+            pass
         self.addResponse(response)
         self.sendReply()
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide306f44c8c42d6661932698307efa4ce163e90e
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