summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/_pty.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-08-05 15:02:20 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-08-05 15:02:20 +0200
commiteb863416cde2c7b7a7ab8f70b5bac4b4fc4d8aee (patch)
tree8d7819f2133cbc68f701c7deec9a00ed1cca35f7 /pym/portage/util/_pty.py
parent293bd0e85326a22effb5f10d1489014ecc617e59 (diff)
downloadportage-eb863416cde2c7b7a7ab8f70b5bac4b4fc4d8aee.tar.gz
portage-eb863416cde2c7b7a7ab8f70b5bac4b4fc4d8aee.tar.bz2
portage-eb863416cde2c7b7a7ab8f70b5bac4b4fc4d8aee.zip
Bug #330937: Handle IOError raised by remaining calls to array.fromfile().
Diffstat (limited to 'pym/portage/util/_pty.py')
-rw-r--r--pym/portage/util/_pty.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage/util/_pty.py b/pym/portage/util/_pty.py
index 7fba0e2ba..a4910ec70 100644
--- a/pym/portage/util/_pty.py
+++ b/pym/portage/util/_pty.py
@@ -95,10 +95,8 @@ def _test_pty_eof():
buf = array.array('B')
try:
buf.fromfile(master_file, 1024)
- except EOFError:
- eof = True
- except IOError:
- # This is where data loss occurs.
+ # EOFError was raised in Python <2.6.6 and <2.7.1.
+ except (EOFError, IOError):
eof = True
if not buf: