diff options
Diffstat (limited to 'pym/_emerge/AbstractPollTask.py')
-rw-r--r-- | pym/_emerge/AbstractPollTask.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py index ea13587bc..d4785a2a1 100644 --- a/pym/_emerge/AbstractPollTask.py +++ b/pym/_emerge/AbstractPollTask.py @@ -50,9 +50,14 @@ class AbstractPollTask(AsynchronousTask): except OSError as e: # EIO happens with pty on Linux after the # slave end of the pty has been closed. - if e.errno not in (errno.EAGAIN, errno.EIO): + if e.errno == errno.EIO: + # EOF: return empty buffer + pass + elif e.errno == errno.EAGAIN: + # EAGAIN: return None + buf = None + else: raise - buf = None return buf |