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>
This commit is contained in:
Ryota Ozaki 2012-09-14 21:44:21 +09:00 committed by Luiz Capitulino
parent e9d17b6890
commit e37b350aa8

View File

@ -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)