diff options
author | Ryota Ozaki <ozaki.ryota@gmail.com> | 2012-09-14 21:44:21 +0900 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-09-26 10:45:02 -0300 |
commit | e37b350aa8766ae36ec9bf40fab665455d4a5530 (patch) | |
tree | ab2be22e35294e549e66e443f2c7d3d64daa107e /QMP/qmp.py | |
parent | e9d17b6890ae772f3652c8cacf4e1f72f576f907 (diff) | |
download | qemu-e37b350aa8766ae36ec9bf40fab665455d4a5530.zip |
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/qmp.py')
-rw-r--r-- | QMP/qmp.py | 5 |
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) |