From 503089ea9d6b358f1a06ad1f164561b7cf11c742 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 7 Oct 2016 14:05:15 +1100 Subject: unix: Use mp_raise_OSError helper function. --- unix/modmachine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unix/modmachine.c') diff --git a/unix/modmachine.c b/unix/modmachine.c index 1b62b68c34..e5f9ec8d70 100644 --- a/unix/modmachine.c +++ b/unix/modmachine.c @@ -27,7 +27,7 @@ #include #include -#include "py/nlr.h" +#include "py/runtime.h" #include "py/obj.h" #include "extmod/machine_mem.h" @@ -58,7 +58,7 @@ uintptr_t mod_machine_mem_get_addr(mp_obj_t addr_o, uint align) { if (!fd) { fd = open("/dev/mem", O_RDWR | O_SYNC); if (fd == -1) { - nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(errno))); + mp_raise_OSError(errno); } } -- cgit v1.2.3