File tree 1 file changed +2
-10
lines changed
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 21
21
except ImportError :
22
22
pass
23
23
24
+ import errno
24
25
import gc
25
26
from sys import byteorder
26
- from errno import ETIMEDOUT
27
27
28
28
from micropython import const
29
29
from adafruit_ticks import ticks_ms , ticks_diff
@@ -638,7 +638,7 @@ def recv_into( # pylint: disable=unused-argument
638
638
# non-blocking mode
639
639
break
640
640
if ticks_diff (ticks_ms (), last_read_time ) / 1000 > self ._timeout :
641
- raise timeout ( "timed out" )
641
+ raise OSError ( errno . ETIMEDOUT )
642
642
return num_read
643
643
644
644
@_check_socket_closed
@@ -813,11 +813,3 @@ def type(self):
813
813
def proto (self ):
814
814
"""Socket protocol (always 0x00 in this implementation)."""
815
815
return 0
816
-
817
-
818
- class timeout (TimeoutError ): # pylint: disable=invalid-name
819
- """TimeoutError class. An instance of this error will be raised by recv_into() if
820
- the timeout has elapsed and we haven't received any data yet."""
821
-
822
- def __init__ (self , msg ):
823
- super ().__init__ (ETIMEDOUT , msg )
You can’t perform that action at this time.
0 commit comments