diff options
| author | Damien George <damien.p.george@gmail.com> | 2016-10-07 13:44:55 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2016-10-07 13:44:55 +1100 |
| commit | 620c4c32bf1ad3123d0b5a326fede444149651c3 (patch) | |
| tree | b493a7488af0ff6f1d91cf4009a7c8fc804fc3fe /extmod/vfs_fat_file.c | |
| parent | 3a0a7717304cc34a4d6ef55f767666c918c185b5 (diff) | |
extmod/vfs_fat: Use mp_raise_OSError helper function.
Diffstat (limited to 'extmod/vfs_fat_file.c')
| -rw-r--r-- | extmod/vfs_fat_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 0cd61e460..305d2d2f1 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -208,7 +208,7 @@ STATIC mp_obj_t file_open(const mp_obj_type_t *type, mp_arg_val_t *args) { FRESULT res = f_open(&o->fp, fname, mode); if (res != FR_OK) { m_del_obj(pyb_file_obj_t, o); - nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(fresult_to_errno_table[res]))); + mp_raise_OSError(fresult_to_errno_table[res]); } // for 'a' mode, we must begin at the end of the file |
