aboutsummaryrefslogtreecommitdiff
path: root/QMP/qmp.py
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2012-10-15 16:58:02 -0400
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:18 +0200
commitb3d0380ec245d73e5233366f541497ef92b2e283 (patch)
treef8ca86d135eed778a72eba4f8978493cda99cfe8 /QMP/qmp.py
parentee17f9d5fd44fba950ab2290dd30f38d1cd2b625 (diff)
qmp: fix __accept() in qmp.py
In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation from __negotiate_capabilities(), which breaks _accept(). This causes failures in qemu-io python based tests (i.e. tests 030 and 040). This patch creates the sockfile in __accept() as well. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'QMP/qmp.py')
-rw-r--r--QMP/qmp.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/QMP/qmp.py b/QMP/qmp.py
index 33c7d36d9b..32510a176a 100644
--- a/QMP/qmp.py
+++ b/QMP/qmp.py
@@ -96,6 +96,7 @@ class QEMUMonitorProtocol:
@raise QMPCapabilitiesError if fails to negotiate capabilities
"""
self.__sock, _ = self.__sock.accept()
+ self.__sockfile = self.__sock.makefile()
return self.__negotiate_capabilities()
def cmd_obj(self, qmp_cmd):