diff options
Diffstat (limited to 'Lib/idlelib/textView.py')
-rw-r--r-- | Lib/idlelib/textView.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/idlelib/textView.py b/Lib/idlelib/textView.py index 9dc83574ee..b9ca9e3269 100644 --- a/Lib/idlelib/textView.py +++ b/Lib/idlelib/textView.py @@ -77,6 +77,10 @@ def view_file(parent, title, filename, encoding=None, modal=True): tkMessageBox.showerror(title='File Load Error', message='Unable to load file %r .' % filename, parent=parent) + except UnicodeDecodeError as err: + tkMessageBox.showerror(title='Unicode Decode Error', + message=str(err), + parent=parent) else: return view_text(parent, title, contents, modal) |