Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da05a15

Browse files
committed
extmod/modasyncio.c: Drop message from set_result/set_exception.
This takes up some bytes for not much as far as benefit goes, so I've removed the message.
1 parent 6a459bb commit da05a15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extmod/modasyncio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ STATIC mp_obj_t task_get_coro(mp_obj_t self_in) {
233233
STATIC MP_DEFINE_CONST_FUN_OBJ_1(task_get_coro_obj, task_get_coro);
234234

235235
STATIC mp_obj_t task_set_exception(mp_obj_t self_in, const mp_obj_t arg) {
236-
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("Task does not support set_exception operation"));
236+
mp_raise_msg(&mp_type_RuntimeError, NULL);
237237
}
238238
STATIC MP_DEFINE_CONST_FUN_OBJ_2(task_set_exception_obj, task_set_exception);
239239

@@ -266,7 +266,7 @@ STATIC mp_obj_t task_exception(mp_obj_t self_in) {
266266
STATIC MP_DEFINE_CONST_FUN_OBJ_1(task_exception_obj, task_exception);
267267

268268
STATIC mp_obj_t task_set_result(mp_obj_t self_in, const mp_obj_t arg) {
269-
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("Task does not support set_result operation"));
269+
mp_raise_msg(&mp_type_RuntimeError, NULL);
270270
}
271271
STATIC MP_DEFINE_CONST_FUN_OBJ_2(task_set_result_obj, task_set_result);
272272

0 commit comments

Comments
 (0)