Add except clause to fallback to default xml parsing in case of not having lxml
@@ -51,6 +51,8 @@ class XMLResult(Result):
try:
parser = etree.XMLParser(huge_tree=True)
tree = etree.parse(BytesIO(xmlstring), parser)
+ except TypeError:
+ tree = etree.fromstring(xmlstring)
except Exception as e:
log.exception("Error parsing XML results: %s"%xmlstring)
raise e
