def statusFromList(alist, indent, func = None):
    """ generate a status message from the list of objects, using the specified function for
    formatting """
    if func == None:
        func = lambda item : '(' + str(item['id']) + ') ' + item['nzbName']
        
    status = ''
    if len(alist):
        i = 0
        for item in alist:
            if i:
                status += ' '*indent

            status += func(item)
            
            if i < len(alist) - 1:
                status += '\n'
            i += 1
    else:
        status += 'None'
    return status