Skip to content

Commit f4e68e8

Browse files
committed
use mp_get_stream_raise, it's more specific
1 parent de455b5 commit f4e68e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/gifio/GifWriter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static void write_word(gifio_gifwriter_t *self, uint16_t value) {
7878

7979
void shared_module_gifio_gifwriter_construct(gifio_gifwriter_t *self, mp_obj_t *file, int width, int height, displayio_colorspace_t colorspace, bool loop, bool dither, bool own_file) {
8080
self->file = file;
81-
self->file_proto = mp_proto_get_or_throw(MP_QSTR_protocol_stream, file);
81+
self->file_proto = mp_get_stream_raise(file, MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL);
8282
if (self->file_proto->is_text) {
8383
mp_raise_TypeError(translate("file must be a file opened in byte mode"));
8484
}

0 commit comments

Comments
 (0)