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 fd8f8cb commit 4574dfeCopy full SHA for 4574dfe
tools/schema-downloader.py
@@ -102,14 +102,15 @@
102
target = dspec['targetPattern'].replace('%s', version)
103
tempfile, _ = urlretrieve(source) # nosec B310
104
print(source, '->', target)
105
- with open(tempfile, 'r') as tmpf, \
106
- open(target, 'w', newline='\n') as tarf:
+ with open(tempfile, 'r') as tmpf:
107
text = tmpf.read()
+ with open(target, 'w', newline='\n') as tarf:
108
for search, replace in dspec['replace']:
109
text = text.replace(search, replace)
110
for search, replace in dspec['replaceRE']:
111
text = search.sub(replace, text)
112
tarf.write(text)
113
114
for source, target in OTHER_DOWNLOADABLES:
115
+ print(source, '->', target)
116
urlretrieve(source, target) # nosec B310
0 commit comments