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:
Alexandre Vassalotti 2009-07-22 00:19:57 +00:00
parent 3e7f609346
commit df4ff08be4
1 changed files with 1 additions and 1 deletions

View File

@ -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)