summaryrefslogtreecommitdiff
path: root/tools/xml_helper.py
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-18 17:32:46 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-19 19:08:15 +0100
commit35df744355671d87e951e4c61e71c464fd517619 (patch)
tree746eabc6a5e41079c428b4aea7bd0553f5f96b4e /tools/xml_helper.py
parentd74a9adf93a24d7a90dece58d80fc1f2e9cd7799 (diff)
downloadsystemd-35df744355671d87e951e4c61e71c464fd517619.tar.gz
Add SPDX license headers to python scripts
Diffstat (limited to 'tools/xml_helper.py')
-rwxr-xr-xtools/xml_helper.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/xml_helper.py b/tools/xml_helper.py
index 0088be5bd9..47434c7156 100755
--- a/tools/xml_helper.py
+++ b/tools/xml_helper.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
+# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
@@ -27,9 +28,11 @@ class CustomResolver(tree.Resolver):
_parser = tree.XMLParser()
_parser.resolvers.add(CustomResolver())
+
def xml_parse(page):
doc = tree.parse(page, _parser)
doc.xinclude()
return doc
+
def xml_print(xml):
return tree.tostring(xml, pretty_print=True, encoding='utf-8')