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 #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
OUTFILE_HEADER = """#!/usr/bin/env python3 OUTFILE_HEADER = """#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
# #
# create-sys-script.py # create-sys-script.py
# #

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # -*- 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 # This file is part of systemd. It is distrubuted under the MIT license, see
# below. # below.

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# #
# This file is part of systemd. # This file is part of systemd.
# #

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# #
# This file is part of systemd. # This file is part of systemd.
# #

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# #
# This file is part of systemd. # This file is part of systemd.
# #

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# #
# This file is part of systemd. # This file is part of systemd.
# #

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# #
# This file is part of systemd. # This file is part of systemd.
# #
@ -27,9 +28,11 @@ class CustomResolver(tree.Resolver):
_parser = tree.XMLParser() _parser = tree.XMLParser()
_parser.resolvers.add(CustomResolver()) _parser.resolvers.add(CustomResolver())
def xml_parse(page): def xml_parse(page):
doc = tree.parse(page, _parser) doc = tree.parse(page, _parser)
doc.xinclude() doc.xinclude()
return doc return doc
def xml_print(xml): def xml_print(xml):
return tree.tostring(xml, pretty_print=True, encoding='utf-8') return tree.tostring(xml, pretty_print=True, encoding='utf-8')