From 5426e509c7053f75746bbb6ce0673e0663e4e98a Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 3 Aug 2010 03:37:02 +0200 Subject: [PATCH] Bug #330937: Handle IOError raised by array.fromfile(). --- pym/_emerge/SpawnProcess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py index a4a6d87ee..bacbc2f30 100644 --- a/pym/_emerge/SpawnProcess.py +++ b/pym/_emerge/SpawnProcess.py @@ -148,7 +148,8 @@ class SpawnProcess(SubProcess): buf = array.array('B') try: buf.fromfile(files.process, self._bufsize) - except EOFError: + # EOFError was raised in Python <2.6.6 and <2.7.1. + except (EOFError, IOError): pass if buf: -- 2.26.2