From 29a34dbdb52cb005fd272a67ccb0bcf08363a25b Mon Sep 17 00:00:00 2001 From: Sam Gibson Date: Sat, 18 Jul 2015 10:04:06 +1000 Subject: Resolves code review comments * Lots of rust-isms * Mutable iterator for modifying entries (much better) --- python/servo/bootstrap_commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/servo/bootstrap_commands.py') 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: -- cgit v1.2.3