def _reopen_file(self):
        """Attempt to reopen the pipe."""

        if self._timer:
            if not self._timer.called:
                self._timer.cancel()
            self._timer = None

        try:
            self._open_file()
        except __HOLE__, (errno, errmsg):
            log.warn("Failed to reopen nagios pipe: %s" % errmsg)
            self._timer = reactor.callLater(10.0, self._reopen_file)
        else:
            log.info("Reopened nagios pipe, resuming writes.")
dataset/ETHPy150Open marineam/nagcat/python/nagcat/nagios_api.py/NagiosWriter._reopen_file