]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Display IDLE warning as a warning rather than as an error.
authorTerry Jan Reedy <tjreedy@udel.edu>
Tue, 27 Oct 2015 07:38:02 +0000 (03:38 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Tue, 27 Oct 2015 07:38:02 +0000 (03:38 -0400)
Clarify message and expected action for beginners.
Guard against astral chars in path incorporated in message.

Lib/idlelib/EditorWindow.py

index 0196344d8dcd6a87c592834e557c16ff5eead2d2..8d6549cfa4fbaea7bca9b4173a3b410e62800e31 100644 (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: