aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/servo/bootstrap_commands.py2
-rw-r--r--python/servo/util.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index fbc02afb61a..835c7bf21c2 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -244,7 +244,7 @@ class MachCommands(CommandBase):
with open(path.join(preload_path, preload_filename), 'w') as fd:
json.dump(entries, fd, indent=4)
- except ValueError, e:
+ except ValueError as e:
print("Unable to parse chromium HSTS preload list, has the format changed?")
sys.exit(1)
diff --git a/python/servo/util.py b/python/servo/util.py
index f51b1f12252..e30f377db66 100644
--- a/python/servo/util.py
+++ b/python/servo/util.py
@@ -136,16 +136,16 @@ def download(desc, src, writer, start_byte=0):
if not dumb:
print()
- except urllib.error.HTTPError, e:
+ except urllib.error.HTTPError as e:
print("Download failed ({}): {} - {}".format(e.code, e.reason, src))
if e.code == 403:
print("No Rust compiler binary available for this platform. "
"Please see https://github.com/servo/servo/#prerequisites")
sys.exit(1)
- except urllib.error.URLError, e:
+ except urllib.error.URLError as e:
print("Error downloading {}: {}. The failing URL was: {}".format(desc, e.reason, src))
sys.exit(1)
- except socket_error, e:
+ except socket_error as e:
print("Looks like there's a connectivity issue, check your Internet connection. {}".format(e))
sys.exit(1)
except KeyboardInterrupt: