Update screen_utils.py

This commit is contained in:
chrys87 2018-05-30 12:11:24 +02:00 committed by GitHub
parent 4a102bda20
commit aa6af0bd9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,13 @@ def createScreenEventData(content):
def hasMore(fd, timetout=0.2): def hasMore(fd, timetout=0.2):
r, _, _ = select.select([fd], [], [], timetout) r, _, _ = select.select([fd], [], [], timetout)
return (fd in r) 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 = ''): def isValidShell(shell = ''):
if not isinstance(shell, str): if not isinstance(shell, str):
return False return False