From: Alexandre Vassalotti Date: Wed, 22 Jul 2009 00:19:57 +0000 (+0000) Subject: Fix open_urlresource() to pass its arguments to open() when the resource is cached. X-Git-Tag: v3.2a1~2765 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df4ff08be41e2013b41f575d0a0ed61e74d4c0ad;p=python 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. --- diff --git a/Lib/test/support.py b/Lib/test/support.py index e11fbaed67..04964a1095 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -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)