[Python-checkins] python/dist/src/Lib/xml/parsers expat.py,1.1,1.1.26.1

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Thu, 08 Aug 2002 07:34:14 -0700


Update of /cvsroot/python/python/dist/src/Lib/xml/parsers
In directory usw-pr-cvs1:/tmp/cvs-serv20361

Modified Files:
      Tag: release22-maint
	expat.py 
Log Message:
Since pyexpat isn't always available in Python 2.2, allow repeated
imports of xml.parsers.expat to raise ImportError if pyexpat isn't
available.

Not needed in Python 2.3, since pyexpat is always built there.


Index: expat.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/parsers/expat.py,v
retrieving revision 1.1
retrieving revision 1.1.26.1
diff -C2 -d -r1.1 -r1.1.26.1
*** expat.py	23 Sep 2000 04:44:43 -0000	1.1
--- expat.py	8 Aug 2002 14:34:12 -0000	1.1.26.1
***************
*** 2,4 ****
  __version__ = '$Revision$'
  
! from pyexpat import *
--- 2,13 ----
  __version__ = '$Revision$'
  
! import sys
! 
! try:
!     from pyexpat import *
! except ImportError:
!     del sys.modules[__name__]
!     del sys
!     raise
! 
! del sys