Revert "Comment out _formatXMLError."

This reverts commit 5f90be47.
parent 5f90be47
...@@ -276,7 +276,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple): ...@@ -276,7 +276,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
maximal_delay = int(option_dict.get("maximal_delay", "0")) maximal_delay = int(option_dict.get("maximal_delay", "0"))
if maximal_delay > 0: if maximal_delay > 0:
duration = int(maximal_delay * random()) duration = int(maximal_delay * random())
logging.info("Sleeping for %s seconds. To disable this feature, " logging.info("Sleeping for %s seconds. To disable this feature, " \
"check --now parameter in slapgrid help." % duration) "check --now parameter in slapgrid help." % duration)
time.sleep(duration) time.sleep(duration)
...@@ -975,10 +975,9 @@ class Slapgrid(object): ...@@ -975,10 +975,9 @@ class Slapgrid(object):
try: try:
document = etree.parse(string_to_validate) document = etree.parse(string_to_validate)
except (etree.XMLSyntaxError, etree.DocumentInvalid) as e: except (etree.XMLSyntaxError, etree.DocumentInvalid) as e:
logger.info('Failed to parse this XML report : %s' % to_be_validated) logger.info('Failed to parse this XML report : %s\n%s' % \
# XXX-Cedric: _formatXMLError has never been commited. (to_be_validated, _formatXMLError(e)))
#logger.error(_formatXMLError(e)) logger.error(_formatXMLError(e))
logger.error(e)
return False return False
if xmlschema.validate(document): if xmlschema.validate(document):
...@@ -1022,9 +1021,7 @@ class Slapgrid(object): ...@@ -1022,9 +1021,7 @@ class Slapgrid(object):
except (etree.XMLSyntaxError, etree.DocumentInvalid) as e: except (etree.XMLSyntaxError, etree.DocumentInvalid) as e:
self.logger.info("Failed to parse %s." % (usage_string)) self.logger.info("Failed to parse %s." % (usage_string))
self.logger.error(e) self.logger.error(e)
# XXX-Cedric: _formatXMLError has never been commited. raise _formatXMLError(e)
#raise _formatXMLError(e)
raise
except Exception: except Exception:
raise "Failed to generate XML report." raise "Failed to generate XML report."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment