]> granicus.if.org Git - python/commitdiff
when only using half of the return value of os.path.split(), use
authorFred Drake <fdrake@acm.org>
Wed, 20 Oct 2004 11:08:35 +0000 (11:08 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 20 Oct 2004 11:08:35 +0000 (11:08 +0000)
os.path.dirname() or os.path.basename() instead

Lib/xml/sax/saxutils.py

index 631159b7594f10518fa3da4e5f81716fc7d754fa..11dd25bbe216f1104895a1f46f61be472adceb4a 100644 (file)
@@ -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)