[Zope3-checkins] CVS: Zope3/lib/python/Zope/TAL - XMLParser.py:1.10

Fred L. Drake, Jr. fdrake@acm.org
Thu, 8 Aug 2002 11:27:30 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv31193

Modified Files:
	XMLParser.py 
Log Message:
Use the one-true-way of importing Expat.


=== Zope3/lib/python/Zope/TAL/XMLParser.py 1.9 => 1.10 ===
--- Zope3/lib/python/Zope/TAL/XMLParser.py:1.9	Mon Jun 10 19:29:43 2002
+++ Zope3/lib/python/Zope/TAL/XMLParser.py	Thu Aug  8 11:27:30 2002
@@ -64,14 +64,9 @@
 
     def createParser(self, encoding=None):
         global XMLParseError
-        try:
-            from Products.ParsedXML.Expat import pyexpat
-            XMLParseError = pyexpat.ExpatError
-            return pyexpat.ParserCreate(encoding, ' ')
-        except ImportError:
-            from xml.parsers import expat
-            XMLParseError = expat.ExpatError
-            return expat.ParserCreate(encoding, ' ')
+        from xml.parsers import expat
+        XMLParseError = expat.ExpatError
+        return expat.ParserCreate(encoding, ' ')
 
     def parseFile(self, filename):
         self.parseStream(open(filename))