diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2018-02-12 22:42:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-12 22:42:41 (GMT) |
commit | 688722cedd6437910ff185ecf94fb3b749ad37f2 (patch) | |
tree | fb6bd49c0019cb3e84d27180d07a4b533e74134a /Lib/idlelib/textview.py | |
parent | f34e03ec0ea6a4cef8d966087c77e616c4a5893b (diff) | |
download | cpython-688722cedd6437910ff185ecf94fb3b749ad37f2.zip cpython-688722cedd6437910ff185ecf94fb3b749ad37f2.tar.gz cpython-688722cedd6437910ff185ecf94fb3b749ad37f2.tar.bz2 |
bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646)
Using the system and place-dependent default encoding for open()
is a bad idea for IDLE's system and location-independent files.
Diffstat (limited to 'Lib/idlelib/textview.py')
-rw-r--r-- | Lib/idlelib/textview.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/textview.py b/Lib/idlelib/textview.py index e3b5506..6620134 100644 --- a/Lib/idlelib/textview.py +++ b/Lib/idlelib/textview.py @@ -107,7 +107,7 @@ def view_text(parent, title, text, modal=True, _utest=False): return ViewWindow(parent, title, text, modal, _utest=_utest) -def view_file(parent, title, filename, encoding=None, modal=True, _utest=False): +def view_file(parent, title, filename, encoding, modal=True, _utest=False): """Create text viewer for text in filename. Return error message if file cannot be read. Otherwise calls view_text |