Fix SF bug #557436, TclError is a str should be an Exception

Make Tkinter.TclError derive from Exception, it was a string.
This commit is contained in:
Neal Norwitz 2002-06-04 17:14:07 +00:00
parent 293dd4b77b
commit b5b5a260ea
2 changed files with 5 additions and 1 deletions

View file

@ -2123,7 +2123,7 @@ init_tkinter(void)
m = Py_InitModule("_tkinter", moduleMethods);
d = PyModule_GetDict(m);
Tkinter_TclError = Py_BuildValue("s", "TclError");
Tkinter_TclError = PyErr_NewException("_tkinter.TclError", NULL, NULL);
PyDict_SetItemString(d, "TclError", Tkinter_TclError);
ins_long(d, "READABLE", TCL_READABLE);