summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-07-01 21:12:47 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-07-01 21:12:47 (GMT)
commit3c0f2c91adf086f809169f94ca9a2a75df3dc996 (patch)
tree5e379450b2aa832000360993bc12550fcee972a5
parentbcc58e87e8595bcb374947a30e0bf3d62771abbf (diff)
downloadcpython-3c0f2c91adf086f809169f94ca9a2a75df3dc996.zip
cpython-3c0f2c91adf086f809169f94ca9a2a75df3dc996.tar.gz
cpython-3c0f2c91adf086f809169f94ca9a2a75df3dc996.tar.bz2
Fix SF bug #763637, 2.3b2 unpack tuple of wrong size in after_cancel
Tk 8.4 may return different values than 8.3. This fix should handle either version.
-rw-r--r--Lib/lib-tk/Tkinter.py6
-rw-r--r--Misc/NEWS3
2 files changed, 7 insertions, 2 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 11dae12..b5b0af3 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -475,8 +475,10 @@ class Misc:
Identifier returned by after or after_idle must be
given as first parameter."""
try:
- (script, type) = self.tk.splitlist(
- self.tk.call('after', 'info', id))
+ data = self.tk.call('after', 'info', id)
+ # In Tk 8.3, splitlist returns: (script, type)
+ # In Tk 8.4, splitlist may return (script, type) or (script,)
+ script = self.tk.splitlist(data)[0]
self.deletecommand(script)
except TclError:
pass
diff --git a/Misc/NEWS b/Misc/NEWS
index 84da757..479f2e2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@ Library
- SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
when there are no lines.
+- SF bug 763637: fix exception in Tkinter with after_cancel
+ which could occur with Tk 8.4
+
Tools/Demos
-----------