'create a dictionary of fields with errors
@param tree: S3ImportJob.error_tree
@return: errordict'

def __parse_job_error_tree(self, tree):

    errordict = {}
    for resource in tree:
        resourcename = resource.attrib.get('name')
        for field in resource:
            fieldname = field.attrib.get('field')
            error = field.attrib.get('error')
            if error:
                errordict[('%s-%s' % (resourcename, fieldname))] = error
    return errordict
