Update ptyDriver.py
This commit is contained in:
parent
00a9d2beda
commit
b87dccbd49
@ -75,11 +75,9 @@ class driver(screenDriver):
|
|||||||
self.env['screen']['autoIgnoreScreens'] = []
|
self.env['screen']['autoIgnoreScreens'] = []
|
||||||
self.env['general']['prevUser'] = getpass.getuser()
|
self.env['general']['prevUser'] = getpass.getuser()
|
||||||
self.env['general']['currUser'] = getpass.getuser()
|
self.env['general']['currUser'] = getpass.getuser()
|
||||||
def readAll(self,fd, timeout = 9999999, interruptFd = None):
|
def readAll(self,fd, timeout = 9999999, interruptFd = None, len = 4096):
|
||||||
|
bytes = b''
|
||||||
starttime = time.time()
|
starttime = time.time()
|
||||||
bytes = os.read(fd, 4096)
|
|
||||||
if bytes == b'':
|
|
||||||
raise EOFError
|
|
||||||
# respect timeout but wait a little bit of time to see if something more is here
|
# respect timeout but wait a little bit of time to see if something more is here
|
||||||
fdList = [fd]
|
fdList = [fd]
|
||||||
if interruptFd:
|
if interruptFd:
|
||||||
@ -94,7 +92,7 @@ class driver(screenDriver):
|
|||||||
break
|
break
|
||||||
if (time.time() - starttime) >= timeout:
|
if (time.time() - starttime) >= timeout:
|
||||||
break
|
break
|
||||||
data = os.read(fd, 4096)
|
data = os.read(fd, len)
|
||||||
if data == b'':
|
if data == b'':
|
||||||
raise EOFError
|
raise EOFError
|
||||||
bytes += data
|
bytes += data
|
||||||
|
Loading…
Reference in New Issue
Block a user