aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy
diff options
context:
space:
mode:
authorJan Andre Ikenmeyer <jan@ikenmeyer.eu>2018-11-19 14:46:20 +0100
committerJan Andre Ikenmeyer <jan@ikenmeyer.eu>2018-11-19 14:46:20 +0100
commit12c0d1350ada99201f5c55afb04d9a7d40b75aa7 (patch)
treedeaa1bcbf07f7c285cc672a241d12fe8c5759b36 /python/tidy/servo_tidy
parent1ac6f435c8637d01279b51fecb535a19b639aea5 (diff)
downloadservo-12c0d1350ada99201f5c55afb04d9a7d40b75aa7.tar.gz
servo-12c0d1350ada99201f5c55afb04d9a7d40b75aa7.zip
servo-tidy: Allow to use MPL with http and https
Diffstat (limited to 'python/tidy/servo_tidy')
-rw-r--r--python/tidy/servo_tidy/licenseck.py8
-rw-r--r--python/tidy/servo_tidy/tidy.py4
2 files changed, 9 insertions, 3 deletions
diff --git a/python/tidy/servo_tidy/licenseck.py b/python/tidy/servo_tidy/licenseck.py
index 95a1154cc00..28ea34274e7 100644
--- a/python/tidy/servo_tidy/licenseck.py
+++ b/python/tidy/servo_tidy/licenseck.py
@@ -7,12 +7,18 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.
-MPL = """\
+OLD_MPL = """\
This Source Code Form is subject to the terms of the Mozilla Public \
License, v. 2.0. If a copy of the MPL was not distributed with this \
file, You can obtain one at http://mozilla.org/MPL/2.0/.\
"""
+MPL = """\
+This Source Code Form is subject to the terms of the Mozilla Public \
+License, v. 2.0. If a copy of the MPL was not distributed with this \
+file, You can obtain one at https://mozilla.org/MPL/2.0/.\
+"""
+
APACHE = """\
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or \
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license \
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index f8def74e57c..446db50feea 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -22,7 +22,7 @@ import colorama
import toml
import voluptuous
import yaml
-from licenseck import MPL, APACHE, COPYRIGHT, licenses_toml, licenses_dep_toml
+from licenseck import OLD_MPL, MPL, APACHE, COPYRIGHT, licenses_toml, licenses_dep_toml
topdir = os.path.abspath(os.path.dirname(sys.argv[0]))
wpt = os.path.join(topdir, "tests", "wpt")
@@ -235,7 +235,7 @@ def check_license(file_name, lines):
license_block.append(line)
header = " ".join(license_block)
- valid_license = MPL in header or is_apache_licensed(header)
+ valid_license = OLD_MPL in header or MPL in header or is_apache_licensed(header)
acknowledged_bad_license = "xfail-license" in header
if not (valid_license or acknowledged_bad_license):
yield (1, "incorrect license")