summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-10-27 07:38:02 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-10-27 07:38:02 (GMT)
commit4c973e9a4b1ffbbe64051267b248cd389fd0636f (patch)
treef48c1fbf6905d712365526bda2923e3afad1d06f /Lib/idlelib/EditorWindow.py
parent5487c13e44ec851023383edda6e33458aaa1310f (diff)
downloadcpython-4c973e9a4b1ffbbe64051267b248cd389fd0636f.zip
cpython-4c973e9a4b1ffbbe64051267b248cd389fd0636f.tar.gz
cpython-4c973e9a4b1ffbbe64051267b248cd389fd0636f.tar.bz2
Display IDLE warning as a warning rather than as an error.
Clarify message and expected action for beginners. Guard against astral chars in path incorporated in message.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 0196344..8d6549c 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -887,9 +887,11 @@ class EditorWindow(object):
except OSError as err:
if not getattr(self.root, "recentfilelist_error_displayed", False):
self.root.recentfilelist_error_displayed = True
- tkMessageBox.showerror(title='IDLE Error',
- message='Unable to update Recent Files list:\n%s'
- % str(err),
+ tkMessageBox.showwarning(title='IDLE Warning',
+ message="Cannot update File menu Recent Files list. "
+ "Your operating system says:\n%s\n"
+ "Select OK and IDLE will continue without updating."
+ % self._filename_to_unicode(str(err)),
parent=self.text)
# for each edit window instance, construct the recent files menu
for instance in self.top.instance_dict: