aboutsummaryrefslogtreecommitdiff
path: root/QMP
diff options
context:
space:
mode:
authorRyota Ozaki <ozaki.ryota@gmail.com>2012-09-14 21:44:21 +0900
committerLuiz Capitulino <lcapitulino@redhat.com>2012-09-26 10:45:02 -0300
commite37b350aa8766ae36ec9bf40fab665455d4a5530 (patch)
treeab2be22e35294e549e66e443f2c7d3d64daa107e /QMP
parente9d17b6890ae772f3652c8cacf4e1f72f576f907 (diff)
Support settimeout in QEMUMonitorProtocol
This method is used in the following qemu-ga-client script to implement non-blocking operations. Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'QMP')
-rw-r--r--QMP/qmp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/QMP/qmp.py b/QMP/qmp.py
index 5a573e1488..33c7d36d9b 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)