1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-23 01:16:18 +00:00

Don't pretty print XML output

This commit is contained in:
spl0k 2019-02-03 19:35:05 +01:00
parent 3b6186ebfc
commit 53d8660683

View File

@ -8,7 +8,6 @@
# Distributed under terms of the GNU AGPLv3 license. # Distributed under terms of the GNU AGPLv3 license.
from flask import json, jsonify, make_response from flask import json, jsonify, make_response
from xml.dom import minidom
from xml.etree import ElementTree from xml.etree import ElementTree
from ..py23 import dict, strtype from ..py23 import dict, strtype
@ -138,8 +137,7 @@ class XMLFormatter(BaseFormatter):
root = ElementTree.Element('subsonic-response') root = ElementTree.Element('subsonic-response')
self.__dict2xml(root, response) self.__dict2xml(root, response)
rv = minidom.parseString(ElementTree.tostring(root)).toprettyxml(indent = ' ') rv = make_response(ElementTree.tostring(root))
rv = make_response(rv)
rv.mimetype = 'text/xml' rv.mimetype = 'text/xml'
return rv return rv