diff options
author | Sam Gibson <sam@ifdown.net> | 2015-07-08 18:26:33 +1200 |
---|---|---|
committer | Sam Gibson <sam@ifdown.net> | 2015-07-22 11:49:06 +1200 |
commit | 8086034e0b9ff93c262758c450865f12ca445649 (patch) | |
tree | 643d53bb3ee51bd46a2c2fac524f3963b3b6504d /python/servo/bootstrap_commands.py | |
parent | a068a806190490dcf5830563dd0d15f3416b31f5 (diff) | |
download | servo-8086034e0b9ff93c262758c450865f12ca445649.tar.gz servo-8086034e0b9ff93c262758c450865f12ca445649.zip |
Commit HSTS preload list to source control
* No longer download the HSTS list as a bootstrap step
* Check the current revision of the HSTS list into source
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r-- | python/servo/bootstrap_commands.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 407addc31b3..3eb501e2377 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -54,8 +54,6 @@ def download(desc, src, writer): if fsize is not None: pct = recved * 100.0 / fsize print("\rDownloading %s: %5.1f%%" % (desc, pct), end="") - else: - print("\rDownloading %s" % desc, end="") sys.stdout.flush() writer.write(chunk) @@ -207,27 +205,19 @@ class MachCommands(CommandBase): extract(tgz_file, cargo_dir, movedir=nightly_dir) print("Cargo ready.") - @Command('bootstrap-hsts-preload', + @Command('update-hsts-preload', description='Download the HSTS preload list', category='bootstrap') - @CommandArgument('--force', '-f', - action='store_true', - help='Force download even if HSTS list already exist') def bootstrap_hsts_preload(self, force=False): preload_filename = "hsts_preload.json" preload_path = path.join(self.context.topdir, "resources") - if not force and path.exists(path.join(preload_path, preload_filename)): - print("HSTS preload list already downloaded.", end=" ") - print("Use |bootstrap-hsts-preload --force| to download again.") - return - chromium_hsts_url = "https://chromium.googlesource.com/chromium/src" + \ "/net/+/master/http/transport_security_state_static.json?format=TEXT" try: content_base64 = download_bytes("Chromium HSTS preload list", chromium_hsts_url) - except URLError, e: + except urllib2.URLError, e: print("Unable to download chromium HSTS preload list, are you connected to the internet?") sys.exit(1) |