summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/moduzlib.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-07 13:52:14 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-07 13:52:14 +1100
commit75af908c0ec2a0d47e6aded15b35cd630f93d48b (patch)
treec953c0fb450b3a6e14c64affdea90299c300ca99 /extmod/moduzlib.c
parent06d0083468dc5bb30ba65f0fb10892ef5fe54296 (diff)
downloadmicropython-75af908c0ec2a0d47e6aded15b35cd630f93d48b.tar.gz
micropython-75af908c0ec2a0d47e6aded15b35cd630f93d48b.zip
extmod: Use mp_raise_OSError helper function.
Diffstat (limited to 'extmod/moduzlib.c')
-rw-r--r--extmod/moduzlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c
index b0e0b005e3..c5d4c48120 100644
--- a/extmod/moduzlib.c
+++ b/extmod/moduzlib.c
@@ -59,7 +59,7 @@ STATIC unsigned char read_src_stream(TINF_DATA *data) {
byte c;
mp_uint_t out_sz = stream->read(self->src_stream, &c, 1, &err);
if (out_sz == MP_STREAM_ERROR) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(err)));
+ mp_raise_OSError(err);
}
if (out_sz == 0) {
nlr_raise(mp_obj_new_exception(&mp_type_EOFError));