summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-10-20 11:08:35 (GMT)
committerFred Drake <fdrake@acm.org>2004-10-20 11:08:35 (GMT)
commit910b282fbbba5463edf98e86a58ed88c481c365d (patch)
tree021cdf1d58806fa5debcb4788d72f490749c8a99 /Lib/xml/sax
parent4ed315ae6674e710c5374bda3660ede3a5f0a95c (diff)
downloadcpython-910b282fbbba5463edf98e86a58ed88c481c365d.zip
cpython-910b282fbbba5463edf98e86a58ed88c481c365d.tar.gz
cpython-910b282fbbba5463edf98e86a58ed88c481c365d.tar.bz2
when only using half of the return value of os.path.split(), use
os.path.dirname() or os.path.basename() instead
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r--Lib/xml/sax/saxutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py
index 631159b..11dd25b 100644
--- a/Lib/xml/sax/saxutils.py
+++ b/Lib/xml/sax/saxutils.py
@@ -283,7 +283,7 @@ def prepare_input_source(source, base = ""):
if source.getByteStream() is None:
sysid = source.getSystemId()
- basehead = os.path.split(os.path.normpath(base))[0]
+ basehead = os.path.dirname(os.path.normpath(base))
sysidfilename = os.path.join(basehead, sysid)
if os.path.isfile(sysidfilename):
source.setSystemId(sysidfilename)