From: Jeff Cody Date: Mon, 15 Oct 2012 20:58:02 +0000 (-0400) Subject: qmp: fix __accept() in qmp.py X-Git-Tag: v1.3.0-rc0~143^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3d0380ec245d73e5233366f541497ef92b2e283;p=thirdparty%2Fqemu.git 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 Reviewed-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- diff --git a/QMP/qmp.py b/QMP/qmp.py index 33c7d36d9b7..32510a176a2 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):