'Produces URLs from our data source, hands them in to the consumer.'

def ProduceURLs(self, consumer):

    (frame, file) = OpenFileForRead(self._path, 'URLLIST')
    if (not file):
        return
    linenum = 0
    for line in file.readlines():
        linenum = (linenum + 1)
        if self._encoding:
            line = encoder.WidenText(line, self._encoding)
        line = line.strip()
        if ((not line) or (line[0] == '#')):
            continue
        url = URL()
        cols = line.split('    ')
        for i in range(0, len(cols)):
            cols[i] = cols[i].strip()
        url.TrySetAttribute('loc', cols[0])
        for i in range(1, len(cols)):
            if cols[i]:
                try:
                    (attr_name, attr_val) = cols[i].split('=', 1)
                    url.TrySetAttribute(attr_name, attr_val)
                except ValueError:
                    output.Warn(('Line    %d:    Unable    to    parse    attribute:    %s' % (linenum, cols[i])))
        consumer(url, False)
    file.close()
    if frame:
        frame.close()
