def iotimeout(self, function, args=(), kwargs={}, timeout=30):
        self._timed_out = 0
        ev = self.add(timeout, 1, self._timedio_cb)
        try:
            while 1:
                try:
                    rv = function(*args, **kwargs)
                except EnvironmentError as val:
                    if val.errno == EINTR:
                        if self._timed_out:
                            raise TimeoutError
                        else:
                            continue
                    else:
                        raise
                else:
                    break
        finally:
            self.remove(ev)
        return rv
Ensure we can extract users from a passwd file.
dataset/ETHPy150Open kdart/pycopia/core/pycopia/scheduler.py/Scheduler.iotimeout--crossover with--dataset/ETHPy150Open google/grr/grr/parsers/osx_file_parser_test.py/TestOSXFileParsing.testOSXUsersParser