qmp: fix __accept() in qmp.py
PATCH v2 1/1 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.
--- QMP/qmp.py | 1 + 1 file changed, 1 insertion(+)
QMP/qmp.py +1 -0
@@ -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):
Signature · 1 line
1.7.11.4
Kevin Wolf
AppliedAm 15.10.2012 22:58, schrieb Jeff Cody:
Quoted 7 lines
In QEMUMonitorProtocol, commit e9d17b6 removed the
__sockfilecreation 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 <[email protected]>
Thanks, applied to the block branch.
Kevin
Quoted 10 lines · Jeff Cody
In QEMUMonitorProtocol, commit e9d17b6 removed the
__sockfilecreation 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 <[email protected]>--- QMP/qmp.py | 1 + 1 file changed, 1 insertion(+)
Quoted 7 lines · On Mon, 15 Oct 2012 16:58:02 -0400 Jeff Cody <[email protected]> wrote:
In QEMUMonitorProtocol, commit e9d17b6 removed the
__sockfilecreation 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 <[email protected]>
Quoted 16 lines
--- QMP/qmp.py | 1 + 1 file changed, 1 insertion(+)QMP/qmp.py +1
-0@@ -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):