From 910b282fbbba5463edf98e86a58ed88c481c365d Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 20 Oct 2004 11:08:35 +0000 Subject: when only using half of the return value of os.path.split(), use os.path.dirname() or os.path.basename() instead --- Lib/xml/sax/saxutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/xml/sax/saxutils.py') diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py index 631159b759..11dd25bbe2 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) -- cgit v1.2.1