aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-28 14:56:01 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-28 14:56:01 -0700
commitf781e9379efe10c278154f82d85bd3cbf0ffed0d (patch)
tree9392c1768fbbbc9bde593ae5ffc4dbc29a4fd4ab /tools
parent39a7f2ee0aa7e8d926e8823f776525dc3876e750 (diff)
Fixed dumb mistake in makespec.py.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/makespec.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/makespec.py b/tools/makespec.py
index 7ae2a0c..38c7d3b 100755
--- a/tools/makespec.py
+++ b/tools/makespec.py
@@ -38,8 +38,8 @@ def parseYaml(yaml):
def pipe_through_prog(prog, text):
p1 = Popen(prog.split(), stdout=PIPE, stdin=PIPE, stderr=PIPE)
- [result, err] = p1.communicate(input=text.encode('utf-8'))
- return [p1.returncode, result.decode('utf-8'), err]
+ [result, err_out] = p1.communicate(input=text.encode('utf-8'))
+ return [p1.returncode, result.decode('utf-8'), err_out]
def replaceAnchor(match):
refs.append("[{0}]: #{1}".format(match.group(1), match.group(2)))
@@ -138,7 +138,7 @@ elif specformat == "html":
section['contents'] + '](#' + section['ident'] + ')')
toc = '<div id="TOC">\n\n' + '\n'.join(toclines) + '\n\n</div>\n\n'
prog = "cmark --smart"
- [retcode, result, err] = pipe_through_prog(prog, toc + mdtext)
+ [retcode, result, err_out] = pipe_through_prog(prog, toc + mdtext)
if retcode == 0:
result = re.sub(r'␣', '<span class="space"> </span>', result)
result = re.sub(r'<h([1-6])><a id="([^\"]*)"><\/a> ',
@@ -167,7 +167,7 @@ elif specformat == "html":
else:
err("Error converting markdown version of spec:\n")
- err(err)
+ err(err_out)
exit(1)
exit(0)