#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
OUTFILE_HEADER = """#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
#
# create-sys-script.py
#
#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
#
# networkd integration test
# This uses temporary configuration in /run and temporary veth devices, and
#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
+#
# Simple udev rules syntax checker
#
# (C) 2010 Canonical Ltd.
#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
#
# sys-script.py
#
#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
#
# systemd-sysv-generator integration test
#
#!/usr/bin/env python3
-
+# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Michal Sekletar <msekleta@redhat.com>
#
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
+# SPDX-License-Identifier: MIT
#
# This file is part of systemd. It is distrubuted under the MIT license, see
# below.
#!/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.
#
#!/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.
#
#!/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.
#
#!/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.
#
#!/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.
#
_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')