mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06:17 +00:00
Don't pretty print XML output
This commit is contained in:
parent
3b6186ebfc
commit
53d8660683
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user