Bug #330937: Handle IOError raised by array.fromfile().
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Tue, 3 Aug 2010 01:37:02 +0000 (03:37 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Tue, 3 Aug 2010 01:37:02 +0000 (03:37 +0200)
pym/_emerge/SpawnProcess.py

index a4a6d87ee55a3ea1e04bf9d3b7fb2385d3c3c8ef..bacbc2f30faf50b5ce1b81a343826d4af39fc56e 100644 (file)
@@ -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: