diff options
author | 2010-08-02 01:43:11 -0400 | |
---|---|---|
committer | 2010-08-02 01:43:11 -0400 | |
commit | 988769ca85337609a4c816d44a89e6e0811e7670 (patch) | |
tree | 280f33ba947008a2c8709e3f136fb337b1200329 | |
parent | Added setValid and set Invalid to AugEditTree (diff) | |
download | ventoo-988769ca85337609a4c816d44a89e6e0811e7670.tar.gz ventoo-988769ca85337609a4c816d44a89e6e0811e7670.tar.bz2 ventoo-988769ca85337609a4c816d44a89e6e0811e7670.zip |
Added getValidationScript to VentooModule
-rw-r--r-- | src/ventoo/VentooModule.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ventoo/VentooModule.py b/src/ventoo/VentooModule.py index e320766..86ec9c5 100644 --- a/src/ventoo/VentooModule.py +++ b/src/ventoo/VentooModule.py @@ -69,6 +69,14 @@ class VentooModule: pass return None + def getValidationScript(self, xPath): + try: + elem = self.xmlTree.xpath(osp.join(xPath)) + if len(elem) >= 1 and not elem[0].get("validate") == None: + return osp.abspath(osp.join(self.docRoot, augeas_utils.stripBothSlashes(elem[0].get("validate")))) + except etree.XPathEvalError: + pass + return None """ Returns true if a comes before b |