415 | | data = os.read(fd, 256 * 1024) |
416 | | if fd == infno : |
417 | | indata += data |
418 | | if not data : # If yes, then no more input data |
419 | | self.unregisterFileNo(pollster, infno) |
420 | | self.logdebug("Input data ends.") |
421 | | endinput = 1 # this happens with real files. |
422 | | elif fd == fromcfno : |
423 | | outdata += data |
424 | | elif fd == cerrfno : |
425 | | errdata += data |
| 418 | try : |
| 419 | data = os.read(fd, 256 * 1024) |
| 420 | except OSError, msg : |
| 421 | self.logdebug("Error while reading file %s : %s" % (fd, msg) |
| 422 | else : |
| 423 | if fd == infno : |
| 424 | indata += data |
| 425 | if not data : # If yes, then no more input data |
| 426 | self.unregisterFileNo(pollster, infno) |
| 427 | self.logdebug("Input data ends.") |
| 428 | endinput = 1 # this happens with real files. |
| 429 | elif fd == fromcfno : |
| 430 | outdata += data |
| 431 | elif fd == cerrfno : |
| 432 | errdata += data |