'Formats data on \'info\' for csv output'

def reporting_csv(self, info, order, noheaders):

    outputheaders = ''
    outputbody = ''
    sep = ','
    info_count = 0
    for item in info:
        item_count = 0
        for key in order:
            if (info_count == 0):
                outputheaders += (str(key) + sep)
            if (key in item.keys()):
                outputbody += (str(item[key]) + sep)
            else:
                outputbody += ('-' + sep)
            item_count += 1
        info_count += 1
        outputbody += '\n'
    outputheaders += '\n'
    if noheaders:
        outputheaders = ''
    return (outputheaders + outputbody)
