diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-18 17:32:46 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-19 19:08:15 +0100 |
commit | 35df744355671d87e951e4c61e71c464fd517619 (patch) | |
tree | 746eabc6a5e41079c428b4aea7bd0553f5f96b4e /tools/xml_helper.py | |
parent | d74a9adf93a24d7a90dece58d80fc1f2e9cd7799 (diff) | |
download | systemd-35df744355671d87e951e4c61e71c464fd517619.tar.gz |
Add SPDX license headers to python scripts
Diffstat (limited to 'tools/xml_helper.py')
-rwxr-xr-x | tools/xml_helper.py | 3 |
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') |