'Returns an iterator over the data file for a set of ranges'

def app_iter_ranges(self, ranges, content_type, boundary, size):

    if (not ranges):
        (yield '')
    else:
        try:
            self._suppress_file_closing = True
            for chunk in multi_range_iterator(ranges, content_type, boundary, size, self.app_iter_range):
                (yield chunk)
        finally:
            self._suppress_file_closing = False
            self.close()
