summaryrefslogtreecommitdiff
path: root/bin/SConsDoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/SConsDoc.py')
-rw-r--r--bin/SConsDoc.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py
index cfb4e54..a6654c2 100644
--- a/bin/SConsDoc.py
+++ b/bin/SConsDoc.py
@@ -168,7 +168,7 @@ xsi = "http://www.w3.org/2001/XMLSchema-instance"
# Header comment with copyright
copyright_comment = """
-Copyright (c) 2001 - 2017 The SCons Foundation
+Copyright (c) 2001 - 2019 The SCons Foundation
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -461,6 +461,8 @@ else:
return self.decorateWithHeader(t)
def validateXml(self, fpath, xmlschema_context):
+ retval = True
+
# Create validation context
validation_context = xmlschema_context.schemaNewValidCtxt()
# Set error/warning handlers
@@ -470,17 +472,19 @@ else:
doc = libxml2.readFile(fpath, None, libxml2.XML_PARSE_NOENT)
doc.xincludeProcessFlags(libxml2.XML_PARSE_NOENT)
err = validation_context.schemaValidateDoc(doc)
- # Cleanup
- doc.freeDoc()
- del validation_context
if err or eh.errors:
for e in eh.errors:
print(e.rstrip("\n"))
+ # import pdb; pdb.set_trace()
print("%s fails to validate" % fpath)
- return False
+ retval = False
- return True
+ # Cleanup
+ doc.freeDoc()
+ del validation_context
+
+ return retval
def findAll(self, root, tag, ns=None, xpath_context=None, nsmap=None):
if hasattr(root, 'xpathEval') and xpath_context: