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

Use Salt for mach bootstrap #14974

Merged
merged 5 commits into from Jan 20, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Avoid hardcoded references to rustc in download()

Use the `desc` parameter instead to make the error messages
customized for the actual download.

Also use new-style format strings.
  • Loading branch information
aneeshusa committed Jan 15, 2017
commit ef900cbdcb0e544639ae10b390a68da2afd8bcce
@@ -67,9 +67,9 @@ def host_triple():

def download(desc, src, writer, start_byte=0):
if start_byte:
print("Resuming download of %s..." % desc)
print("Resuming download of {}...".format(desc))
else:
print("Downloading %s..." % desc)
print("Downloading {}...".format(desc))
dumb = (os.environ.get("TERM") == "dumb") or (not sys.stdout.isatty())

try:
@@ -101,16 +101,16 @@ def download(desc, src, writer, start_byte=0):
if not dumb:
print()
except urllib2.HTTPError, e:
print("Download failed (%d): %s - %s" % (e.code, e.reason, src))
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 urllib2.URLError, e:
print("Error downloading Rust compiler: %s. The failing URL was: %s" % (e.reason, src))
print("Error downloading {}: {}. The failing URL was: {}".format(desc, e.reason, src))
sys.exit(1)
except socket_error, e:
print("Looks like there's a connectivity issue, check your Internet connection. %s" % (e))
print("Looks like there's a connectivity issue, check your Internet connection. {}".format(e))
sys.exit(1)
except KeyboardInterrupt:
writer.flush()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.