File _service:download_src_package:PyXML-0.8.4-cvs20041111-python2.4-backport.patch of Package PyXML
x
1
diff -ur PyXML-0.8.4.orig/xml/sax/saxutils.py PyXML-0.8.4/xml/sax/saxutils.py
2
--- PyXML-0.8.4.orig/xml/sax/saxutils.py 2004-11-11 19:02:46.097146160 +0100
3
+++ PyXML-0.8.4/xml/sax/saxutils.py 2004-11-11 19:07:44.566771880 +0100
4
5
6
if source.getByteStream() is None:
7
sysid = source.getSystemId()
8
- if os.path.isfile(sysid):
9
- basehead = os.path.split(os.path.normpath(base))[0]
10
- source.setSystemId(os.path.join(basehead, sysid))
11
- f = open(sysid, "rb")
12
+ basehead = os.path.dirname(os.path.normpath(base))
13
+ sysidfilename = os.path.join(basehead, sysid)
14
+ if os.path.isfile(sysidfilename):
15
+ source.setSystemId(sysidfilename)
16
+ f = open(sysidfilename, "rb")
17
else:
18
source.setSystemId(urlparse.urljoin(base, sysid))
19
f = urllib2.urlopen(source.getSystemId())
20