Mercurial > hg > graal-jvmci-8
diff mxtool/mx.py @ 15922:2022366b513c
mx: add verbose mode to download helper
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Tue, 27 May 2014 12:14:54 +0200 |
parents | a9781031ecf1 |
children | 674d4065e9fb |
line wrap: on
line diff
--- a/mxtool/mx.py Tue May 27 12:08:11 2014 +0200 +++ b/mxtool/mx.py Tue May 27 12:14:54 2014 +0200 @@ -1887,14 +1887,17 @@ os.makedirs(d) - if sys.stderr.isatty() and not path.endswith(os.sep): + if not path.endswith(os.sep): # Try it with the Java tool first since it can show a progress counter myDir = dirname(__file__) javaSource = join(myDir, 'URLConnectionDownload.java') javaClass = join(myDir, 'URLConnectionDownload.class') if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): subprocess.check_call([java().javac, '-d', myDir, javaSource]) - if run([java().java, '-cp', myDir, 'URLConnectionDownload', path] + urls, nonZeroIsFatal=False) == 0: + verbose = [] + if sys.stderr.isatty(): + verbose.append("-v") + if run([java().java, '-cp', myDir, 'URLConnectionDownload', path] + verbose + urls, nonZeroIsFatal=False) == 0: return def url_open(url):