servo: Merge #5122 - Filter out "Downloading rust snapshot" percent indicator in mach's outpu (from aweinstock314:master); r=kmcallister

...t based on sys.stdout.isatty() (Issue #5043).

Source-Repo: https://github.com/servo/servo
Source-Revision: 315a2349e8e0064be3d8ba1ab42cdd38ff3451a7
This commit is contained in:
Avi Weinstock 2015-03-02 20:18:49 -07:00
parent f7ffceeeaa
commit 9b02835116

View File

@ -38,7 +38,7 @@ def download(desc, src, dst):
sys.stdout.flush()
print("Downloading %s..." % desc)
dumb = os.environ.get("TERM") == "dumb"
dumb = (os.environ.get("TERM") == "dumb") or (not sys.stdout.isatty())
PanickyUrlOpener().retrieve(src, dst, None if dumb else report)
if not dumb:
print()