Add SPDX license headers to python scripts

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-11-19 19:08:15 +01:00
parent d74a9adf93
commit 35df744355
12 changed files with 16 additions and 1 deletions
+2
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
#
+1
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
+2
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.
+1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# sys-script.py
#
+1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# systemd-sysv-generator integration test
#
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Michal Sekletar <msekleta@redhat.com>
#
+1
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.
+1
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.
#
+1
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.
#
+1
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.
#
+1
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.
#
+3
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')