summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-11-13 20:27:19 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-11-14 15:09:50 (GMT)
commit8341a7a162a9d579cf2b6c8cb5a8830c7433f759 (patch)
treea060bfdc6a12d96176e7510364c157792328e21f
parent270442c79407d8826af0234d7f9ebe65fa450c00 (diff)
downloadSCons-8341a7a162a9d579cf2b6c8cb5a8830c7433f759.zip
SCons-8341a7a162a9d579cf2b6c8cb5a8830c7433f759.tar.gz
SCons-8341a7a162a9d579cf2b6c8cb5a8830c7433f759.tar.bz2
minor improvements in script logic
-rw-r--r--bin/SConsDoc.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py
index d566644..ed9c607 100644
--- a/bin/SConsDoc.py
+++ b/bin/SConsDoc.py
@@ -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: