mirror of https://github.com/python/cpython
when only using half of the return value of os.path.split(), use
os.path.dirname() or os.path.basename() instead
This commit is contained in:
parent
4ed315ae66
commit
910b282fbb
|
@ -283,7 +283,7 @@ def prepare_input_source(source, base = ""):
|
||||||
|
|
||||||
if source.getByteStream() is None:
|
if source.getByteStream() is None:
|
||||||
sysid = source.getSystemId()
|
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)
|
sysidfilename = os.path.join(basehead, sysid)
|
||||||
if os.path.isfile(sysidfilename):
|
if os.path.isfile(sysidfilename):
|
||||||
source.setSystemId(sysidfilename)
|
source.setSystemId(sysidfilename)
|
||||||
|
|
Loading…
Reference in New Issue