Skip to content

Commit 1e40840

Browse files
committed
Add OSError, Python 3.3 generic I/O exception.
1 parent fd04bb3 commit 1e40840

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

py/mpqstrraw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Q(NameError)
3030
Q(SyntaxError)
3131
Q(TypeError)
3232
Q(ValueError)
33+
Q(OSError)
3334

3435
Q(abs)
3536
Q(all)

py/runtime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ void rt_init(void) {
8484
mp_qstr_map_lookup(&map_builtins, MP_QSTR_TypeError, true)->value = mp_obj_new_exception(MP_QSTR_TypeError);
8585
mp_qstr_map_lookup(&map_builtins, MP_QSTR_SyntaxError, true)->value = mp_obj_new_exception(MP_QSTR_SyntaxError);
8686
mp_qstr_map_lookup(&map_builtins, MP_QSTR_ValueError, true)->value = mp_obj_new_exception(MP_QSTR_ValueError);
87+
mp_qstr_map_lookup(&map_builtins, MP_QSTR_OSError, true)->value = mp_obj_new_exception(MP_QSTR_OSError);
8788

8889
// built-in objects
8990
mp_qstr_map_lookup(&map_builtins, MP_QSTR_Ellipsis, true)->value = mp_const_ellipsis;

0 commit comments

Comments
 (0)