Try remapping all broken errs wholesale on windows

transport_cleaning
Tyler Goodlet 2021-07-04 10:47:15 -04:00
parent 9c9309faf8
commit caa70245e0
1 changed files with 7 additions and 2 deletions

View File

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