We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41f768f commit e69b7e8Copy full SHA for e69b7e8
1 file changed
unix/file.c
@@ -20,8 +20,9 @@ typedef struct _mp_obj_fdfile_t {
20
21
#ifdef MICROPY_CPYTHON_COMPAT
22
void check_fd_is_open(const mp_obj_fdfile_t *o) {
23
- if (o->fd < 0)
+ if (o->fd < 0) {
24
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "I/O operation on closed file"));
25
+ }
26
}
27
#else
28
#define check_fd_is_open(o)
0 commit comments