* revive check method in autoxml objects

This commit is contained in:
Eray Özkural
2005-11-17 19:35:33 +00:00
parent 9bb7629cdd
commit 8d7d941c2f
3 changed files with 8 additions and 0 deletions
+6
View File
@@ -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):
+1
View File
@@ -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
+1
View File
@@ -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 *"