You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tkColorChooser may fail if no color is selected #48017
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/loewis'closed_at=<Date2008-12-29.16:28:46.232>created_at=<Date2008-09-03.22:32:10.522>labels= ['expert-tkinter', 'release-blocker']
title='tkColorChooser may fail if no color is selected'updated_at=<Date2008-12-29.16:28:46.231>user='https://bugs.python.org/gpolo'
Chooser._fixresult in the tkColorChooser module uses "if not result" to
check if user canceled the dialog, but nowadays Tk may return a cached
object that contains the result we are after, so, this object will not
simply evaluate to false and _fixresult will act like if the user didn't
cancel the dialog.
The fix is simple, just get the real value of result in that check.
Activity
gpolo commentedon Sep 3, 2008
Chooser._fixresult in the tkColorChooser module uses "if not result" to
check if user canceled the dialog, but nowadays Tk may return a cached
object that contains the result we are after, so, this object will not
simply evaluate to false and _fixresult will act like if the user didn't
cancel the dialog.
The fix is simple, just get the real value of result in that check.
gpolo commentedon Nov 18, 2008
I've noticed a problem with the previous patch, so this new one includes
a comment too so people can remember about the check being applied.
loewis commentedon Dec 13, 2008
Thanks for the patch.
Committed tkColorChooser.diff as r67738 in the 2.5 branch. Applying this
to the other branches still needs to be done.
loewis commentedon Dec 29, 2008
Committed into various branches as r68010, r68011, r68012, and r68013