Skip to content

Instantly share code, notes, and snippets.

@tobiascoetzee
Last active December 30, 2015 06:29
Show Gist options
  • Save tobiascoetzee/7789832 to your computer and use it in GitHub Desktop.
Save tobiascoetzee/7789832 to your computer and use it in GitHub Desktop.
class ValidationChecker():
def __init__(self, validationContext, validationsFile, validationsModule):
self.Context = validationContext
self.Errors = {}
self.__validationsTree = self.__LoadFile(validationsFile)
self.__module = __import__(validationsModule)
def __LoadFile(self, validationsFile):
base = ''
source = os.path.join(base, 'data', 'validations', validationsFile)
logdebug('Loading validation file: %s' % source)
tree = etree.ElementTree()
tree.parse(source)
return tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment