ref: 9401e974b27f1de39b0b9637f659c29c7dbdb971
parent: c5af517b3b1a80bb00f477008308cd2472f228cb
author: Simon Howard <[email protected]>
date: Mon Jan 30 18:00:41 EST 2017
docgen: Fix script. Apparently caused by previous botched merge commit.
--- a/man/docgen
+++ b/man/docgen
@@ -317,8 +317,10 @@
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 @@
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 @@
# 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 @@
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: