Mercurial > hg > truffle
comparison mxtool/mx.py @ 15905:a9781031ecf1
mx: use python downloader if stderr is not a tty to avoid spamming logs
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 26 May 2014 12:01:30 +0200 |
parents | e065b9746246 |
children | 2022366b513c |
comparison
equal
deleted
inserted
replaced
15904:09f3fe273640 | 15905:a9781031ecf1 |
---|---|
1885 d = dirname(path) | 1885 d = dirname(path) |
1886 if d != '' and not exists(d): | 1886 if d != '' and not exists(d): |
1887 os.makedirs(d) | 1887 os.makedirs(d) |
1888 | 1888 |
1889 | 1889 |
1890 if not path.endswith(os.sep): | 1890 if sys.stderr.isatty() and not path.endswith(os.sep): |
1891 # Try it with the Java tool first since it can show a progress counter | 1891 # Try it with the Java tool first since it can show a progress counter |
1892 myDir = dirname(__file__) | 1892 myDir = dirname(__file__) |
1893 javaSource = join(myDir, 'URLConnectionDownload.java') | 1893 javaSource = join(myDir, 'URLConnectionDownload.java') |
1894 javaClass = join(myDir, 'URLConnectionDownload.class') | 1894 javaClass = join(myDir, 'URLConnectionDownload.class') |
1895 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): | 1895 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): |