Commit 42339a55 authored by Jeremy Hylton's avatar Jeremy Hylton

Replace writes to sys.stderr with zLOG calls.

This silences extraneous output when running the TAL tests with a
Python without expat.
parent 63733985
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
Generic expat-based XML parser base class. Generic expat-based XML parser base class.
""" """
import sys import zLOG
class XMLParser: class XMLParser:
...@@ -121,7 +121,8 @@ class XMLParser: ...@@ -121,7 +121,8 @@ class XMLParser:
try: try:
self.parser.ordered_attributes = self.ordered_attributes self.parser.ordered_attributes = self.ordered_attributes
except AttributeError: except AttributeError:
sys.stderr.write("Can't set ordered_attributes\n") zLOG.LOG("TAL.XMLParser", zLOG.INFO,
"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)
...@@ -129,7 +130,8 @@ class XMLParser: ...@@ -129,7 +130,8 @@ class XMLParser:
try: try:
setattr(p, name, method) setattr(p, name, method)
except AttributeError: except AttributeError:
sys.stderr.write("Can't set expat handler %s\n" % name) zLOG.LOG("TAL.XMLParser", zLOG.PROBLEM,
"Can't set expat handler %s" % name)
def createParser(self, encoding=None): def createParser(self, encoding=None):
global XMLParseError global XMLParseError
......
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