Commit bb178344 authored by Andreas Jung's avatar Andreas Jung

zLOG -> logging

parent 19a56357
...@@ -16,9 +16,10 @@ Generic expat-based XML parser base class. ...@@ -16,9 +16,10 @@ Generic expat-based XML parser base class.
""" """
import xml.parsers.expat import xml.parsers.expat
from logging import getLogger
import zLOG
LOG = getLogger('TAL')
XMLParseError = xml.parsers.expat.ExpatError XMLParseError = xml.parsers.expat.ExpatError
...@@ -56,8 +57,7 @@ class XMLParser: ...@@ -56,8 +57,7 @@ class XMLParser:
try: try:
self.parser.ordered_attributes = self.ordered_attributes self.parser.ordered_attributes = self.ordered_attributes
except AttributeError: except AttributeError:
zLOG.LOG("TAL.XMLParser", zLOG.INFO, LOG.info("Can't set ordered_attributes")
"Can't set ordered_attributes")
self.ordered_attributes = 0 self.ordered_attributes = 0
for name in self.handler_names: for name in self.handler_names:
method = getattr(self, name, None) method = getattr(self, name, None)
...@@ -65,8 +65,7 @@ class XMLParser: ...@@ -65,8 +65,7 @@ class XMLParser:
try: try:
setattr(p, name, method) setattr(p, name, method)
except AttributeError: except AttributeError:
zLOG.LOG("TAL.XMLParser", zLOG.PROBLEM, LOG.error("Can't set expat handler %s" % name)
"Can't set expat handler %s" % name)
def createParser(self, encoding=None): def createParser(self, encoding=None):
return xml.parsers.expat.ParserCreate(encoding, ' ') return xml.parsers.expat.ParserCreate(encoding, ' ')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment