buf = array.array('B')
try:
buf.fromfile(f, self._bufsize)
- except EOFError:
+ # EOFError was raised in Python <2.6.6 and <2.7.1.
+ except (EOFError, IOError):
pass
if buf:
buf = array.array('B')
try:
buf.fromfile(self._files.process, self._bufsize)
- except EOFError:
+ # EOFError was raised in Python <2.6.6 and <2.7.1.
+ except (EOFError, IOError):
pass
if buf:
buf = array.array('B')
try:
buf.fromfile(f, buffsize)
- except EOFError:
+ # EOFError was raised in Python <2.6.6 and <2.7.1.
+ except (EOFError, IOError):
pass
if not buf:
eof = True
a = array.array('B')
try:
a.fromfile(f, len(input_bytes) + 1)
- except EOFError:
+ # EOFError was raised in Python <2.6.6 and <2.7.1.
+ except (EOFError, IOError):
# python-3.0 lost data here
eof = True
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: