Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18768 Modified Files: saxutils.py Log Message: SF bug #902037: relative on-disk SYSTEM id handling is incorrect (Contributed by Bob Ippolito.) backport candidate. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- saxutils.py 6 May 2004 02:22:43 -0000 1.23 +++ saxutils.py 20 Oct 2004 08:21:19 -0000 1.24 @@ -283,10 +283,11 @@ if source.getByteStream() is None: sysid = source.getSystemId() - if os.path.isfile(sysid): - basehead = os.path.split(os.path.normpath(base))[0] - source.setSystemId(os.path.join(basehead, sysid)) - f = open(sysid, "rb") + basehead = os.path.split(os.path.normpath(base))[0] + sysidfilename = os.path.join(basehead, sysid) + if os.path.isfile(sysidfilename): + source.setSystemId(sysidfilename) + f = open(sysidfilename, "rb") else: source.setSystemId(urlparse.urljoin(base, sysid)) f = urllib.urlopen(source.getSystemId())