Commit e69b7e82 authored by Damien George's avatar Damien George

unix, file.c: adhere to coding conventions.

parent 41f768f3
......@@ -20,8 +20,9 @@ typedef struct _mp_obj_fdfile_t {
#ifdef MICROPY_CPYTHON_COMPAT
void check_fd_is_open(const mp_obj_fdfile_t *o) {
if (o->fd < 0)
if (o->fd < 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "I/O operation on closed file"));
}
}
#else
#define check_fd_is_open(o)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment