diff --git a/tools/schema-downloader.py b/tools/schema-downloader.py index 1c72947f..d795f474 100755 --- a/tools/schema-downloader.py +++ b/tools/schema-downloader.py @@ -102,9 +102,9 @@ target = dspec['targetPattern'].replace('%s', version) tempfile, _ = urlretrieve(source) # nosec B310 print(source, '->', target) - with open(tempfile, 'r') as tmpf, \ - open(target, 'w', newline='\n') as tarf: + with open(tempfile, 'r') as tmpf: text = tmpf.read() + with open(target, 'w', newline='\n') as tarf: for search, replace in dspec['replace']: text = text.replace(search, replace) for search, replace in dspec['replaceRE']: @@ -112,4 +112,5 @@ tarf.write(text) for source, target in OTHER_DOWNLOADABLES: + print(source, '->', target) urlretrieve(source, target) # nosec B310