From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCVHJ-0004PN-U2 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 08:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCVHI-0007JB-Hb for qemu-devel@nongnu.org; Fri, 14 Sep 2012 08:45:49 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:42654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCVHI-0007IN-AW for qemu-devel@nongnu.org; Fri, 14 Sep 2012 08:45:48 -0400 Received: by mail-pz0-f45.google.com with SMTP id n15so2507852dad.4 for ; Fri, 14 Sep 2012 05:45:47 -0700 (PDT) From: Ryota Ozaki Date: Fri, 14 Sep 2012 21:44:21 +0900 Message-Id: <1347626662-3701-3-git-send-email-ozaki.ryota@gmail.com> In-Reply-To: <1347626662-3701-1-git-send-email-ozaki.ryota@gmail.com> References: <1347626662-3701-1-git-send-email-ozaki.ryota@gmail.com> Subject: [Qemu-devel] [PATCH 2/3] Support settimeout in QEMUMonitorProtocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This method is used in the following qemu-ga-client script to implement non-blocking operations. Signed-off-by: Ryota Ozaki --- 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) -- 1.7.12