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.
This commit is contained in:
Terry Jan Reedy 2015-10-27 03:38:02 -04:00
parent 5487c13e44
commit 4c973e9a4b
1 changed files with 5 additions and 3 deletions

View File

@ -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: