diff options
author | Sam Gibson <sam@ifdown.net> | 2015-07-18 10:04:06 +1000 |
---|---|---|
committer | Sam Gibson <sam@ifdown.net> | 2015-07-22 11:49:06 +1200 |
commit | 29a34dbdb52cb005fd272a67ccb0bcf08363a25b (patch) | |
tree | 537c06dc9892a08485056d80ed2516b8dd9a122c /python/servo/bootstrap_commands.py | |
parent | 8086034e0b9ff93c262758c450865f12ca445649 (diff) | |
download | servo-29a34dbdb52cb005fd272a67ccb0bcf08363a25b.tar.gz servo-29a34dbdb52cb005fd272a67ccb0bcf08363a25b.zip |
Resolves code review comments
* Lots of rust-isms
* Mutable iterator for modifying entries (much better)
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r-- | python/servo/bootstrap_commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 3eb501e2377..0e12b786342 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -218,10 +218,13 @@ class MachCommands(CommandBase): try: content_base64 = download_bytes("Chromium HSTS preload list", chromium_hsts_url) except urllib2.URLError, e: - print("Unable to download chromium HSTS preload list, are you connected to the internet?") + print("Unable to download chromium HSTS preload list; are you connected to the internet?") sys.exit(1) content_decoded = base64.b64decode(content_base64) + + # The chromium "json" has single line comments in it which, of course, + # are non-standard/non-valid json. Simply strip them out before parsing content_json = re.sub(r'//.*$', '', content_decoded, flags=re.MULTILINE) try: |