From 75af908c0ec2a0d47e6aded15b35cd630f93d48b Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 7 Oct 2016 13:52:14 +1100 Subject: extmod: Use mp_raise_OSError helper function. --- extmod/machine_pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extmod/machine_pulse.c') diff --git a/extmod/machine_pulse.c b/extmod/machine_pulse.c index 8c8bff510c..b2a78d72ee 100644 --- a/extmod/machine_pulse.c +++ b/extmod/machine_pulse.c @@ -58,7 +58,7 @@ STATIC mp_obj_t machine_time_pulse_us_(size_t n_args, const mp_obj_t *args) { } mp_uint_t us = machine_time_pulse_us(pin, level, timeout_us); if (us == (mp_uint_t)-1) { - nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(MP_ETIMEDOUT))); + mp_raise_OSError(MP_ETIMEDOUT); } return mp_obj_new_int(us); } -- cgit v1.2.3