comparison Python/errors.c @ 40956:c83acfb1a632 legacy-trunk

SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions are gone.
author Neal Norwitz <nnorwitz@gmail.com>
date Mon, 26 Feb 2007 23:48:27 +0000
parents f3f0c697aa5b
children 3bc3f12cae28
comparison
equal deleted inserted replaced
40951:ee3602c7ae04 40956:c83acfb1a632
588 f = PySys_GetObject("stderr"); 588 f = PySys_GetObject("stderr");
589 if (f != NULL) { 589 if (f != NULL) {
590 PyFile_WriteString("Exception ", f); 590 PyFile_WriteString("Exception ", f);
591 if (t) { 591 if (t) {
592 PyObject* moduleName; 592 PyObject* moduleName;
593 char* className = PyExceptionClass_Name(t); 593 char* className;
594 594 assert(PyExceptionClass_Check(t));
595 className = PyExceptionClass_Name(t);
595 if (className != NULL) { 596 if (className != NULL) {
596 char *dot = strrchr(className, '.'); 597 char *dot = strrchr(className, '.');
597 if (dot != NULL) 598 if (dot != NULL)
598 className = dot+1; 599 className = dot+1;
599 } 600 }