Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e54e726 commit 06d9b1fCopy full SHA for 06d9b1f
1 file changed
Lib/xml/sax/saxutils.py
@@ -283,10 +283,11 @@ def prepare_input_source(source, base = ""):
283
284
if source.getByteStream() is None:
285
sysid = source.getSystemId()
286
- if os.path.isfile(sysid):
287
- basehead = os.path.split(os.path.normpath(base))[0]
288
- source.setSystemId(os.path.join(basehead, sysid))
289
- f = open(sysid, "rb")
+ basehead = os.path.split(os.path.normpath(base))[0]
+ sysidfilename = os.path.join(basehead, sysid)
+ if os.path.isfile(sysidfilename):
+ source.setSystemId(sysidfilename)
290
+ f = open(sysidfilename, "rb")
291
else:
292
source.setSystemId(urlparse.urljoin(base, sysid))
293
f = urllib.urlopen(source.getSystemId())
0 commit comments