mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Get run-tests.py working on python 2.5
[SVN r66276]
This commit is contained in:
parent
8ab66ba51e
commit
a0b0e2d73f
@ -40,7 +40,7 @@ def main(argv):
|
||||
boostbook_xsl = etree.XSLT(
|
||||
etree.parse(os.path.join(boostbook_directory, "docbook.xsl"), parser)
|
||||
)
|
||||
except lxml.etree.XMLSyntaxError as error:
|
||||
except lxml.etree.XMLSyntaxError, error:
|
||||
print "Error parsing boostbook xsl:"
|
||||
print error
|
||||
sys.exit(1)
|
||||
@ -59,11 +59,16 @@ def main(argv):
|
||||
continue
|
||||
|
||||
if (generate_gold):
|
||||
with open(gold_path, 'w') as file:
|
||||
file = open(gold_path, 'w')
|
||||
try:
|
||||
file.write(doc_text)
|
||||
finally: file.close()
|
||||
else:
|
||||
with open(gold_path, 'r') as file:
|
||||
file = open(gold_path, 'r')
|
||||
try:
|
||||
gold_text = file.read()
|
||||
finally:
|
||||
file.close()
|
||||
compare_xml(filename, doc_text, gold_text)
|
||||
|
||||
def run_boostbook(parser, boostbook_xsl, file):
|
||||
|
Loading…
x
Reference in New Issue
Block a user