From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQxcC-0000ru-FL for qemu-devel@nongnu.org; Wed, 24 Oct 2012 05:51:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQxc8-0006hx-8Q for qemu-devel@nongnu.org; Wed, 24 Oct 2012 05:51:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQxc8-0006ht-0M for qemu-devel@nongnu.org; Wed, 24 Oct 2012 05:51:04 -0400 From: Kevin Wolf Date: Wed, 24 Oct 2012 11:50:27 +0200 Message-Id: <1351072256-6112-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1351072256-6112-1-git-send-email-kwolf@redhat.com> References: <1351072256-6112-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 03/32] qmp: fix __accept() in qmp.py List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Jeff Cody 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 --- QMP/qmp.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/QMP/qmp.py b/QMP/qmp.py index 33c7d36..32510a1 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): -- 1.7.6.5