зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #3405 - Support dumb terminals in bootstrap downloads (from andreastt/ato:mach_dumb_term)
Source-Repo: https://github.com/servo/servo Source-Revision: 8ec41f254676c5d089e838152111c72b4a88cff9
This commit is contained in:
Родитель
34ed2923a4
Коммит
9920575919
|
@ -47,8 +47,11 @@ def download(desc, src, dst):
|
||||||
print("\rDownloading %s: %5.1f%%" % (desc, pct), end="")
|
print("\rDownloading %s: %5.1f%%" % (desc, pct), end="")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
urllib.urlretrieve(src, dst, report)
|
print("Downloading %s..." % desc)
|
||||||
print()
|
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):
|
def extract(src, dst, movedir=None):
|
||||||
tarfile.open(src).extractall(dst)
|
tarfile.open(src).extractall(dst)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче