* revive check method in autoxml objects
This commit is contained in:
@@ -350,6 +350,12 @@ class autoxml(oo.autosuper, oo.autoprop):
|
|||||||
errs.extend(self.errors_hook(where))
|
errs.extend(self.errors_hook(where))
|
||||||
return errs
|
return errs
|
||||||
cls.errors = errors
|
cls.errors = errors
|
||||||
|
def check(self):
|
||||||
|
errs = self.errors()
|
||||||
|
if errs:
|
||||||
|
errs.append(_("autoxml.check: '%s' errors") % len(errs))
|
||||||
|
raise Error(*errs)
|
||||||
|
cls.check = check
|
||||||
|
|
||||||
cls.formatters = formatters
|
cls.formatters = formatters
|
||||||
def format(self, f, errs):
|
def format(self, f, errs):
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ XHTML_NS = unicode(XHTML_NAMESPACE)
|
|||||||
XML_NS = unicode(XML_NAMESPACE)
|
XML_NS = unicode(XML_NAMESPACE)
|
||||||
|
|
||||||
import pisi
|
import pisi
|
||||||
|
from pisi.pxml.xmlextcdom import *
|
||||||
|
|
||||||
class Error(pisi.Error):
|
class Error(pisi.Error):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ from xml.parsers.expat import ExpatError
|
|||||||
import codecs
|
import codecs
|
||||||
|
|
||||||
import pisi
|
import pisi
|
||||||
|
from pisi.pxml.xmlextcdom import *
|
||||||
|
|
||||||
class Error(pisi.Error):
|
class Error(pisi.Error):
|
||||||
"named this way because the class if mostly used with an import *"
|
"named this way because the class if mostly used with an import *"
|
||||||
|
|||||||
Reference in New Issue
Block a user