diff options
Diffstat (limited to 'pym/portage/util/_pty.py')
-rw-r--r-- | pym/portage/util/_pty.py | 6 |
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: |