docgen: Fix script.

Apparently caused by previous botched merge commit.
This commit is contained in:
Simon Howard 2017-01-30 23:00:41 -05:00
parent c5af517b3b
commit 9401e974b2

View file

@ -317,8 +317,10 @@ def read_wikipages():
line = re.sub('\#.*$', '', line)
if not re.match('^\s*$', line):
if not re.match(r'^\s*$', line):
wikipages.append(line)
finally:
f.close()
# Add wiki page links
@ -363,7 +365,7 @@ def process_file(filename):
current_config_file = None
f = io.open(file, encoding='UTF-8')
f = io.open(filename, encoding='UTF-8')
try:
param = None
@ -412,6 +414,8 @@ def process_file(filename):
# Start of a normal comment
param = Parameter()
waiting_for_checkparm = False
finally:
f.close()
def process_files(path):
# Process all C source files.
@ -440,9 +444,11 @@ def print_template(template_file, content):
else:
line = line.replace("@content", content)
stdout(line.rstrip().encode('UTF-8') + b'\n')
finally:
f.close()
def manpage_output(targets, template_file):
def manpage_output(targets, template_file):
content = ""
for t in targets: