From 74435d2c40fac59c55f0dfe02b8cc3f90caba74e Mon Sep 17 00:00:00 2001 From: Hellowlol Date: Tue, 13 Oct 2015 13:09:37 +0200 Subject: [PATCH] Raise exception so the uri with the xml that fails are logged. --- plexpy/http_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plexpy/http_handler.py b/plexpy/http_handler.py index abcf7ec7..77f2fd40 100644 --- a/plexpy/http_handler.py +++ b/plexpy/http_handler.py @@ -19,6 +19,7 @@ from plexpy import logger, helpers from httplib import HTTPSConnection from httplib import HTTPConnection +from xml.dom import minidom import ssl @@ -96,7 +97,10 @@ class HTTPHandler(object): elif output_format == 'json': output = helpers.convert_xml_to_json(request_content) elif output_format == 'xml': - output = helpers.parse_xml(request_content) + try: + output = minidom.parseString(request_content) + except Exception as err: + raise else: output = request_content