summaryrefslogtreecommitdiff
path: root/bin/SConsDoc.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-14 08:35:24 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-14 08:35:24 +0200
commit697e33ed224b539a42ff68121f7497f5bbf941b2 (patch)
tree44ae83ad6ad4a7f6762a6d1bfde3766a1993b5ec /bin/SConsDoc.py
parentbaee03c569c91b745a1e025660b19a718db16e7d (diff)
New upstream version 3.0.5upstream/3.0.5
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: