fixed python3 reload-on-exception

This commit is contained in:
roberto@precise64
2012-03-19 13:39:07 +01:00
parent 2043127f22
commit b386317921
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -10,12 +10,16 @@ int manage_python_response(struct wsgi_request *wsgi_req) {
char *uwsgi_python_get_exception_type(PyObject *exc) {
char *class_name = NULL;
#ifndef PYTHREE
if (PyClass_Check(exc)) {
class_name = PyString_AsString( ((PyClassObject*)(exc))->cl_name );
}
else {
#endif
class_name = (char *) ((PyTypeObject*)exc)->tp_name;
#ifndef PYTHREE
}
#endif
if (class_name) {
char *dot = strrchr(class_name, '.');