[Python-checkins] cpython (merge 3.3 -> default): #17614: merge with 3.3.

roger.serwy python-checkins at python.org
Wed Apr 3 05:42:02 CEST 2013


http://hg.python.org/cpython/rev/578edbe38f0a
changeset: 83071:578edbe38f0a
parent: 83068:41645c37fd3d
parent: 83070:d759b7bc9785
user: Roger Serwy <roger.serwy at gmail.com>
date: Tue Apr 02 22:40:39 2013 -0500
summary:
 #17614: merge with 3.3.
files:
 Lib/idlelib/PyShell.py | 6 +++++-
 Misc/NEWS | 2 ++
 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -111,12 +111,13 @@
 self.breakpointPath = os.path.join(idleConf.GetUserCfgDir(),
 'breakpoints.lst')
 # whenever a file is changed, restore breakpoints
- if self.io.filename: self.restore_file_breaks()
 def filename_changed_hook(old_hook=self.io.filename_change_hook,
 self=self):
 self.restore_file_breaks()
 old_hook()
 self.io.set_filename_change_hook(filename_changed_hook)
+ if self.io.filename:
+ self.restore_file_breaks()
 
 rmenu_specs = [
 ("Cut", "<<cut>>", "rmenu_check_cut"),
@@ -233,6 +234,9 @@
 
 def restore_file_breaks(self):
 self.text.update() # this enables setting "BREAK" tags to be visible
+ if self.io is None:
+ # can happen if IDLE closes due to the .update() call
+ return
 filename = self.io.filename
 if filename is None:
 return
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -302,6 +302,8 @@
 Library
 -------
 
+- Issue #17614: IDLE no longer raises exception when quickly closing a file.
+
 - Issue #6698: IDLE now opens just an editor window when configured to do so.
 
 - Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /