Try remapping all broken errs wholesale on windows
parent
9c9309faf8
commit
caa70245e0
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Inter-process comms abstractions
|
Inter-process comms abstractions
|
||||||
"""
|
"""
|
||||||
|
import platform
|
||||||
import typing
|
import typing
|
||||||
from typing import Any, Tuple, Optional
|
from typing import Any, Tuple, Optional
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
@ -13,6 +14,9 @@ from .log import get_logger
|
||||||
from ._exceptions import TransportClosed
|
from ._exceptions import TransportClosed
|
||||||
log = get_logger(__name__)
|
log = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
_is_windows = platform.system() == 'Windows'
|
||||||
|
|
||||||
# :eyeroll:
|
# :eyeroll:
|
||||||
try:
|
try:
|
||||||
import msgpack_numpy
|
import msgpack_numpy
|
||||||
|
@ -73,8 +77,9 @@ class MsgpackTCPStream:
|
||||||
# nix
|
# nix
|
||||||
'[Errno 104]' in msg or
|
'[Errno 104]' in msg or
|
||||||
|
|
||||||
# windows
|
# on windows it seems there are a variety of errors
|
||||||
'[WinError 10054]' in msg
|
# to handle..
|
||||||
|
_is_windows
|
||||||
):
|
):
|
||||||
raise TransportClosed(
|
raise TransportClosed(
|
||||||
f'{self} was broken with {msg}'
|
f'{self} was broken with {msg}'
|
||||||
|
|
Loading…
Reference in New Issue