add rpc.Client.peek_notification

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
YAMAMOTO Takashi 2013-11-28 14:30:04 +09:00 committed by FUJITA Tomonori
parent 21f4f64061
commit 220b9e2ca7

View File

@ -304,3 +304,11 @@ class Client(object):
raise EOFError("EOF")
self._process_input_notification()
self._process_input_request()
def peek_notification(self):
while True:
rlist, _wlist = self._endpoint.selectable()
rlist, _wlist, _xlist = select.select(rlist, [], [], 0)
if not rlist:
break
self.receive_notification()