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. ........
This commit is contained in:
parent
3ff73848f2
commit
428b4e3eee
|
@ -62,11 +62,7 @@ def view_text(parent, title, text):
|
|||
|
||||
def view_file(parent, title, filename, encoding=None):
|
||||
try:
|
||||
if encoding:
|
||||
import codecs
|
||||
textFile = codecs.open(filename, 'r')
|
||||
else:
|
||||
textFile = open(filename, 'r')
|
||||
textFile = open(filename, 'r', encoding=encoding)
|
||||
except IOError:
|
||||
import tkinter.messagebox as tkMessageBox
|
||||
tkMessageBox.showerror(title='File Load Error',
|
||||
|
|
Loading…
Reference in New Issue