def finish(self, runtime=None):
        """Attempts to get the results of the PTR lookup. If the results are
        not available, ``None`` is returned instead.

        When this method returns, the :class:`~gevent.Greenlet` executing the
        lookup is killed.

        :param runtime: If this many seconds have not passed since the lookup
                        started, the method call blocks the remaining time. For
                        example, if 3.5 seconds have elapsed since calling
                        :meth:`.start` and you pass in ``5.0``, this method
                        will wait at most 1.5 seconds for the results to come
                        in.
        :type runtime: float
        :returns: The PTR lookup results (a hostname string) or ``None``.

        """
        try:
            if runtime is None:
                result = self.get(block=False)
            else:
                timeout = time.time() - self.start_time
                result = self.get(block=True, timeout=timeout)
        except gevent.Timeout:
            result = None
        self.kill(block=False)
        return result


# vim:et:fdm=marker:sts=4:sw=4:ts=4
dataset/ETHPy150Open slimta/python-slimta/slimta/util/ptrlookup.py/PtrLookup.finish/original