def get_active_profile(content, key):
    """
    Gets the active profile for the given key in the content's config object, or NONE_PROFILE
    """
    try:
        if content.config.has_option(key, 'profile'):
            return content.config.get(key, 'profile')
        else:
            return 'None'
    except:
        return 'None'