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.
This commit is contained in:
parent
3e7f609346
commit
df4ff08be4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue