summaryrefslogtreecommitdiff
path: root/extmod/vfs_fat_file.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-07 13:44:55 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-07 13:44:55 +1100
commit620c4c32bf1ad3123d0b5a326fede444149651c3 (patch)
treeb493a7488af0ff6f1d91cf4009a7c8fc804fc3fe /extmod/vfs_fat_file.c
parent3a0a7717304cc34a4d6ef55f767666c918c185b5 (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.c2
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