Kaydet (Commit) 428b4e3e authored tarafından Victor Stinner's avatar Victor Stinner

Merged revisions 82057 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82057 | victor.stinner | 2010-06-17 23:43:33 +0200 (jeu., 17 juin 2010) | 2 lines

  Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.
........
üst 3ff73848
...@@ -62,11 +62,7 @@ def view_text(parent, title, text): ...@@ -62,11 +62,7 @@ def view_text(parent, title, text):
def view_file(parent, title, filename, encoding=None): def view_file(parent, title, filename, encoding=None):
try: try:
if encoding: textFile = open(filename, 'r', encoding=encoding)
import codecs
textFile = codecs.open(filename, 'r')
else:
textFile = open(filename, 'r')
except IOError: except IOError:
import tkinter.messagebox as tkMessageBox import tkinter.messagebox as tkMessageBox
tkMessageBox.showerror(title='File Load Error', tkMessageBox.showerror(title='File Load Error',
......
...@@ -66,6 +66,8 @@ C-API ...@@ -66,6 +66,8 @@ C-API
Library Library
------- -------
- Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.
- Issue #8720: fix regression caused by fix for #4050 by making getsourcefile - Issue #8720: fix regression caused by fix for #4050 by making getsourcefile
smart enough to find source files in the linecache. smart enough to find source files in the linecache.
......
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