[Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.9,1.10
Martin v. Löwis
python-dev@python.org
Fri, 6 Oct 2000 14:11:26 -0700
Update of /cvsroot/python/python/dist/src/Lib/xml/sax
In directory slayer.i.sourceforge.net:/tmp/cvs-serv8906
Modified Files:
saxutils.py
Log Message:
Don't use a file object as system id; try to propagate the file name to
the InputSource.
Index: saxutils.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** saxutils.py 2000/10/03 22:35:26 1.9
--- saxutils.py 2000/10/06 21:11:20 1.10
***************
*** 204,209 ****
elif hasattr(source, "read"):
f = source
! source = xmlreader.InputSource(source)
source.setByteStream(f)
if source.getByteStream() is None:
--- 204,211 ----
elif hasattr(source, "read"):
f = source
! source = xmlreader.InputSource()
source.setByteStream(f)
+ if hasattr(f, "name"):
+ f.setSystemId(f.name)
if source.getByteStream() is None: