Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
e1b1abc1
Commit
e1b1abc1
authored
Jul 23, 2014
by
Paul Sokolovsky
Browse files
stream: Revert to checking for the correct error value.
parent
de993f45
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/stream.c
View file @
e1b1abc1
...
...
@@ -97,7 +97,7 @@ STATIC mp_obj_t stream_read(uint n_args, const mp_obj_t *args) {
}
int
error
;
mp_int_t
out_sz
=
o
->
type
->
stream_p
->
read
(
o
,
p
,
more_bytes
,
&
error
);
if
(
out_sz
<
0
)
{
if
(
out_sz
==
-
1
)
{
vstr_cut_tail_bytes
(
&
vstr
,
more_bytes
);
if
(
is_nonblocking_error
(
error
))
{
// With non-blocking streams, we read as much as we can.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment