From 4dc71060a1c03db9d5c02d437f9e40c347b26041 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Wed, 30 May 2018 13:15:50 +0200 Subject: [PATCH] Update ptyDriver.py --- src/fenrirscreenreader/screenDriver/ptyDriver.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fenrirscreenreader/screenDriver/ptyDriver.py b/src/fenrirscreenreader/screenDriver/ptyDriver.py index 1e082588..545c19a8 100644 --- a/src/fenrirscreenreader/screenDriver/ptyDriver.py +++ b/src/fenrirscreenreader/screenDriver/ptyDriver.py @@ -84,14 +84,14 @@ class driver(screenDriver): fdList = [fd] if interruptFd: fdList += [interruptFd] - hasmore = True - while hasmore: - r, hasmore =screen_utils.hasMoreWaht(fdList,0.01): + while True: + r = screen_utils.hasMoreWaht(fdList,0.1): + hasmore = fd in r if not hasmore: break - # exit on stuff like input available + # exit on interrupt available if interruptFd in r: - break + break if (time.time() - starttime) >= timeout: break data = os.read(fd, 4096)