mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 9817f7f027fe1e92cc2fce31d6002c4d669918e8
This commit is contained in:
parent
8e52f8a523
commit
f3533538ea
2144 changed files with 21364 additions and 11001 deletions
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
from os import path, listdir
|
||||
from hashlib import sha512, sha256, md5
|
||||
from base64 import b64encode
|
||||
|
@ -39,14 +41,14 @@ def md5_uri(content):
|
|||
|
||||
def main():
|
||||
for file in js_files():
|
||||
print "Generating content for %s" % file
|
||||
print("Generating content for %s" % file)
|
||||
base = path.splitext(path.basename(file))[0]
|
||||
var_name = re.sub(r"[^a-z0-9]", "_", base)
|
||||
content = "%s=true;" % var_name
|
||||
with open(file, "w") as f: f.write(content)
|
||||
print "\tSHA512 integrity: %s" % sha512_uri(content)
|
||||
print "\tSHA256 integrity: %s" % sha256_uri(content)
|
||||
print "\tMD5 integrity: %s" % md5_uri(content)
|
||||
print("\tSHA512 integrity: %s" % sha512_uri(content))
|
||||
print("\tSHA256 integrity: %s" % sha256_uri(content))
|
||||
print("\tMD5 integrity: %s" % md5_uri(content))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue