mirror of https://github.com/python/cpython.git
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.
This commit is contained in:
parent
bcc58e87e8
commit
3c0f2c91ad
|
@ -475,8 +475,10 @@ def after_cancel(self, id):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue