We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 613dc17 commit 156b7fbCopy full SHA for 156b7fb
scripts/download_import_cldr.py
@@ -75,12 +75,13 @@ def main():
75
cldr_path = os.path.join(repo, 'cldr', os.path.splitext(FILENAME)[0])
76
zip_path = os.path.join(cldr_dl_path, FILENAME)
77
changed = False
78
+ show_progress = (False if os.environ.get("BABEL_CLDR_NO_DOWNLOAD_PROGRESS") else sys.stdout.isatty())
79
80
while not is_good_file(zip_path):
81
log('Downloading \'%s\'', FILENAME)
82
if os.path.isfile(zip_path):
83
os.remove(zip_path)
- urlretrieve(URL, zip_path, reporthook)
84
+ urlretrieve(URL, zip_path, (reporthook if show_progress else None))
85
changed = True
86
print()
87
common_path = os.path.join(cldr_path, 'common')
0 commit comments