From c6c71eefb9532af0d4505de70e58f45ad8e8fe0a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 1 Dec 2011 22:14:13 -0800 Subject: Handle OSError from os.read and loop if needed. Looping fixes EbuildMetadataPhase failures for ebuilds that produce more than 4096 bytes of metadata, broken since commit b432a1b3051d91546649e8f3190675767461d8e8. --- pym/_emerge/AsynchronousLock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/_emerge/AsynchronousLock.py') diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py index 39e36c880..9d0545beb 100644 --- a/pym/_emerge/AsynchronousLock.py +++ b/pym/_emerge/AsynchronousLock.py @@ -138,7 +138,7 @@ class _LockThread(AbstractPollTask): if event & PollConstants.POLLIN: try: buf = os.read(self._files['pipe_read'], self._bufsize) - except IOError as e: + except OSError as e: if e.errno not in (errno.EAGAIN,): raise if buf: @@ -274,7 +274,7 @@ class _LockProcess(AbstractPollTask): if event & PollConstants.POLLIN: try: buf = os.read(self._files['pipe_in'], self._bufsize) - except IOError as e: + except OSError as e: if e.errno not in (errno.EAGAIN,): raise if buf: -- cgit v1.2.3-1-g7c22