def exhaust(iterable, exception=StopIteration):
    """
        call next on an iterator until it's exhausted

        @param iterable: iterable to exhaust
        @param exception: exception marking end of iteration
        """
