We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de993f4 commit e1b1abcCopy full SHA for e1b1abc
1 file changed
py/stream.c
@@ -97,7 +97,7 @@ STATIC mp_obj_t stream_read(uint n_args, const mp_obj_t *args) {
97
}
98
int error;
99
mp_int_t out_sz = o->type->stream_p->read(o, p, more_bytes, &error);
100
- if (out_sz < 0) {
+ if (out_sz == -1) {
101
vstr_cut_tail_bytes(&vstr, more_bytes);
102
if (is_nonblocking_error(error)) {
103
// With non-blocking streams, we read as much as we can.
0 commit comments