[Python-checkins] r65728 - sandbox/trunk/ttk-gsoc/src/idlelib/OutputWindow.py
guilherme.polo
python-checkins at python.org
Sun Aug 17 00:57:58 CEST 2008
Author: guilherme.polo
Date: Sun Aug 17 00:57:58 2008
New Revision: 65728
Log:
Check for a page before continuing
Modified:
sandbox/trunk/ttk-gsoc/src/idlelib/OutputWindow.py
Modified: sandbox/trunk/ttk-gsoc/src/idlelib/OutputWindow.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/idlelib/OutputWindow.py (original)
+++ sandbox/trunk/ttk-gsoc/src/idlelib/OutputWindow.py Sun Aug 17 00:57:58 2008
@@ -21,7 +21,10 @@
def write(self, s, tags=(), mark="insert", text=None):
if text is None:
- text = self.current_page.text
+ page = self.current_page
+ if not page: # tab was destroyed
+ return
+ text = page.text
# Tk assumes that byte strings are Latin-1;
# we assume that they are in the locale's encoding
if isinstance(s, str):
More information about the Python-checkins
mailing list