mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Merge pull request #3405 from andreastt/ato/mach_dumb_term
Support dumb terminals in bootstrap downloads
This commit is contained in:
commit
8ec41f2546
1 changed files with 5 additions and 2 deletions
|
@ -47,8 +47,11 @@ def download(desc, src, dst):
|
|||
print("\rDownloading %s: %5.1f%%" % (desc, pct), end="")
|
||||
sys.stdout.flush()
|
||||
|
||||
urllib.urlretrieve(src, dst, report)
|
||||
print()
|
||||
print("Downloading %s..." % desc)
|
||||
dumb = os.environ.get("TERM") == "dumb"
|
||||
urllib.urlretrieve(src, dst, None if dumb else report)
|
||||
if not dumb:
|
||||
print()
|
||||
|
||||
def extract(src, dst, movedir=None):
|
||||
tarfile.open(src).extractall(dst)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue