Add SPDX license headers to python scripts

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-11-18 17:32:46 +01:00
parent d74a9adf93
commit 35df744355
12 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#!/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
#

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# networkd integration test
# This uses temporary configuration in /run and temporary veth devices, and

View File

@ -1,4 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# Simple udev rules syntax checker
#
# (C) 2010 Canonical Ltd.

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# sys-script.py
#

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# systemd-sysv-generator integration test
#

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Michal Sekletar <msekleta@redhat.com>
#

View File

@ -1,5 +1,6 @@
#!/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.

View File

@ -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.
#

View File

@ -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.
#

View File

@ -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.
#

View File

@ -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.
#

View File

@ -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')