923923 return awaitable ;
924924 } else
925925 {
926- PyErr_SetString (PyExc_RuntimeError , "not right now" );
927- return NULL ;
928926 // If there are no inputs, we can skip parsing!
929927 if (!is_http ) VIEW_FATAL ("got a websocket without an input!" );
930928
@@ -1169,36 +1167,6 @@ supply_parsers(ViewApp *self, PyObject *args)
11691167 Py_RETURN_NONE ;
11701168}
11711169
1172- /*
1173- * Register the base class to be recognized as an HTTP error.
1174- */
1175- static PyObject *
1176- register_error (ViewApp * self , PyObject * args )
1177- {
1178- PyObject * type ;
1179-
1180- if (
1181- !PyArg_ParseTuple (
1182- args ,
1183- "O" ,
1184- & type
1185- )
1186- )
1187- return NULL ;
1188-
1189- if (Py_TYPE (type ) != & PyType_Type )
1190- {
1191- PyErr_SetString (
1192- PyExc_RuntimeError ,
1193- "_register_error got an object that is not a type"
1194- );
1195- return NULL ;
1196- }
1197-
1198- self -> error_type = Py_NewRef (type );
1199- Py_RETURN_NONE ;
1200- }
1201-
12021170static PyMethodDef methods [] =
12031171{
12041172 {"asgi_app_entry" , (PyCFunction ) app , METH_FASTCALL , NULL },
@@ -1212,7 +1180,6 @@ static PyMethodDef methods[] =
12121180 {"_set_dev_state" , (PyCFunction ) set_dev_state , METH_VARARGS , NULL },
12131181 {"_err" , (PyCFunction ) err_handler , METH_VARARGS , NULL },
12141182 {"_supply_parsers" , (PyCFunction ) supply_parsers , METH_VARARGS , NULL },
1215- {"_register_error" , (PyCFunction ) register_error , METH_VARARGS , NULL },
12161183 {NULL , NULL , 0 , NULL }
12171184};
12181185
0 commit comments