def render(self, data, accepted_media_type=None, renderer_context=None):
        renderer_context = renderer_context or {}
        response = renderer_context['response']

        if response and response.exception:
            return XMLRenderer().render(
                data, accepted_media_type, renderer_context)

        return super(TemplateXMLRenderer, self).render(
            data, accepted_media_type, renderer_context)
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/renderers/renderers.py/TemplateXMLRenderer.render/original