mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-01 09:14:10 +01:00
Fix review comments
This commit is contained in:
parent
1f6c4d5bb2
commit
87f2f9e878
|
|
@ -152,16 +152,17 @@ def main(input_module, files=None, out_dir=None, verbose=False, substitutions={}
|
||||||
return
|
return
|
||||||
|
|
||||||
# check the input files and substitute in sections where required
|
# check the input files and substitute in sections where required
|
||||||
for filename in (files):
|
for input_filename in files:
|
||||||
output_filename = os.path.join(out_dir, os.path.basename(filename))
|
output_filename = os.path.join(out_dir,
|
||||||
process_file(env, sections, filename, output_filename)
|
os.path.basename(input_filename))
|
||||||
|
process_file(env, sections, input_filename, output_filename)
|
||||||
|
|
||||||
check_unaccessed("units", units)
|
check_unaccessed("units", units)
|
||||||
|
|
||||||
def process_file(env, sections, filename, output_filename):
|
def process_file(env, sections, filename, output_filename):
|
||||||
log("Parsing input template: %s" % filename)
|
log("Parsing input template: %s" % filename)
|
||||||
|
|
||||||
with open(filename, 'r') as file_stream:
|
with open(filename, "r") as file_stream:
|
||||||
temp_str = file_stream.read().decode("utf-8")
|
temp_str = file_stream.read().decode("utf-8")
|
||||||
|
|
||||||
# do sanity checking on the template to make sure they aren't reffing things
|
# do sanity checking on the template to make sure they aren't reffing things
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue