From patchwork Thu Sep 27 13:28:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 187390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 839782C00AA for ; Fri, 28 Sep 2012 00:42:40 +1000 (EST) Received: from localhost ([::1]:58720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THE97-0007NW-Ik for incoming@patchwork.ozlabs.org; Thu, 27 Sep 2012 09:28:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THE8L-0005WM-Vk for qemu-devel@nongnu.org; Thu, 27 Sep 2012 09:28:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THE8B-0003VY-EB for qemu-devel@nongnu.org; Thu, 27 Sep 2012 09:28:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THE8B-0003VQ-5z for qemu-devel@nongnu.org; Thu, 27 Sep 2012 09:27:55 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8RDRr7v008163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Sep 2012 09:27:53 -0400 Received: from localhost (ovpn-113-87.phx2.redhat.com [10.3.113.87]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8RDRqk4014968; Thu, 27 Sep 2012 09:27:53 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Thu, 27 Sep 2012 10:28:16 -0300 Message-Id: <1348752509-1142-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1348752509-1142-1-git-send-email-lcapitulino@redhat.com> References: <1348752509-1142-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Ryota Ozaki , qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 02/15] Support settimeout in QEMUMonitorProtocol X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Ryota Ozaki This method is used in the following qemu-ga-client script to implement non-blocking operations. Signed-off-by: Ryota Ozaki Signed-off-by: Luiz Capitulino --- QMP/qmp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/QMP/qmp.py b/QMP/qmp.py index 5a573e1..33c7d36 100644 --- a/QMP/qmp.py +++ b/QMP/qmp.py @@ -162,3 +162,8 @@ class QEMUMonitorProtocol: def close(self): self.__sock.close() self.__sockfile.close() + + timeout = socket.timeout + + def settimeout(self, timeout): + self.__sock.settimeout(timeout)