Kaydet (Commit) df4ff08b authored tarafından Alexandre Vassalotti's avatar Alexandre Vassalotti

Fix open_urlresource() to pass its arguments to open() when the resource is cached.

This fixes the failure of test_normalization on the Windows buildbots,
where the Normalization.txt file was read as a MBCS text file, instead
as a UTF-8 one.
üst 3e7f6093
......@@ -455,7 +455,7 @@ def open_urlresource(url, *args, **kw):
fn = os.path.join(os.path.dirname(__file__), "data", filename)
if os.path.exists(fn):
return open(fn)
return open(fn, *args, **kw)
print('\tfetching %s ...' % url, file=get_original_stdout())
fn, _ = urllib.request.urlretrieve(url, fn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment