From aa6af0bd9ef5b4da5b4bddbf48f1c28c4febd5b7 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Wed, 30 May 2018 12:11:24 +0200 Subject: [PATCH] Update screen_utils.py --- src/fenrirscreenreader/utils/screen_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fenrirscreenreader/utils/screen_utils.py b/src/fenrirscreenreader/utils/screen_utils.py index 95075574..efb0d0b9 100644 --- a/src/fenrirscreenreader/utils/screen_utils.py +++ b/src/fenrirscreenreader/utils/screen_utils.py @@ -38,6 +38,13 @@ def createScreenEventData(content): def hasMore(fd, timetout=0.2): r, _, _ = select.select([fd], [], [], timetout) return (fd in r) +def hasMoreWaht(fdList, timetout=0.2): + if not isinstance(fdList, list): + return [], False + if fdList = []: + return [], False + r, _, _ = select.select(fdList, [], [], timetout) + return r, (fd in r) def isValidShell(shell = ''): if not isinstance(shell, str): return False