diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py index 631159b7594..11dd25bbe21 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)