1
0

Updated README. Moved pretty_xml outside of class.

This commit is contained in:
2018-02-05 13:20:15 +01:00
parent a643f90e62
commit 78d9005531
6 changed files with 66 additions and 15 deletions
+1 -2
View File
@@ -26,8 +26,7 @@ class FotaCheck(
servervote.ServerVoteMixin,
credentials.CredentialsMixin,
devlist.DevListMixin,
dumpmgr.DumpMgrMixin,
xmltools.XmlToolsMixin
dumpmgr.DumpMgrMixin
):
"""Main API handler class."""
VDKEY = b"eJwdjwEOwDAIAr8kKFr//7HhmqXp8AIIDrYAgg8byiUXrwRJRXja+d6iNxu0AhUooDCN9rd6rDLxmGIakUVWo3IGCTRWqCAt6X4jGEIUAxgN0eYWnp+LkpHQAg/PsO90ELsy0Npm/n2HbtPndFgGEV31R9OmT4O4nrddjc3Qt6nWscx7e+WRHq5UnOudtjw5skuV09pFhvmqnOEIs4ljPeel1wfLYUF4\n"
+4 -7
View File
@@ -8,10 +8,7 @@
import xml.dom.minidom
class XmlToolsMixin:
"""A mixin component for XML tools."""
@staticmethod
def pretty_xml(xmlstr):
"""Prettify input XML with ``xml.dom.minidom``."""
mdx = xml.dom.minidom.parseString(xmlstr)
return mdx.toprettyxml(indent=" ")
def pretty_xml(xmlstr):
"""Prettify input XML with ``xml.dom.minidom``."""
mdx = xml.dom.minidom.parseString(xmlstr)
return mdx.toprettyxml(indent=" ")