* 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))
|
||||
return errs
|
||||
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
|
||||
def format(self, f, errs):
|
||||
|
||||
@@ -43,6 +43,7 @@ XHTML_NS = unicode(XHTML_NAMESPACE)
|
||||
XML_NS = unicode(XML_NAMESPACE)
|
||||
|
||||
import pisi
|
||||
from pisi.pxml.xmlextcdom import *
|
||||
|
||||
class Error(pisi.Error):
|
||||
pass
|
||||
|
||||
@@ -33,6 +33,7 @@ from xml.parsers.expat import ExpatError
|
||||
import codecs
|
||||
|
||||
import pisi
|
||||
from pisi.pxml.xmlextcdom import *
|
||||
|
||||
class Error(pisi.Error):
|
||||
"named this way because the class if mostly used with an import *"
|
||||
|
||||
Reference in New Issue
Block a user