From fd9373b256a2ae3edae2983eb3fd9da07b9f4702 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 27 Apr 2018 18:19:21 +0200 Subject: [PATCH] Cleanup logs/exception --- facturx/facturx.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/facturx/facturx.py b/facturx/facturx.py index 3ccb8a8..dfab1c3 100644 --- a/facturx/facturx.py +++ b/facturx/facturx.py @@ -135,11 +135,10 @@ def check_facturx_xsd( # if the validation of the XSD fails, we arrive here logger.error( "The XML file is invalid against the XML Schema Definition") - logger.error(xml_string) + logger.error('XSD Error: %s', e) raise Exception( "The %s XML file is not valid against the official " - "XML Schema Definition. The XML file and the " - "full error have been written in the server logs. " + "XML Schema Definition. " "Here is the error, which may give you an idea on the " "cause of the problem: %s." % (flavor.capitalize(), unicode(e))) return True