Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 23607: first pass of changes for compatibility with Python3 #24435

Merged
merged 8 commits into from Oct 16, 2019

Fix except statement in order to be compatible with Python3

  • Loading branch information
marmeladema committed Oct 15, 2019
commit 02cfb4f49e070fc51c04d5d1f7092ae3ca4621bc
@@ -244,7 +244,7 @@ def bootstrap_hsts_preload(self, force=False):

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)

@@ -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:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.