bug: fix OSError.winerror missing on some systems with errno.

This commit is contained in:
UpstreamData
2023-02-22 13:00:09 -07:00
parent 5f2832d632
commit 728e94f120

View File

@@ -162,7 +162,7 @@ If you are sure you want to use this command please use API.send_command("{comma
reader, writer = await asyncio.open_connection(str(self.ip), self.port)
# handle OSError 121
except OSError as e:
if getattr(e, "winerror") == "121":
if e.errno == 121:
logging.warning(
f"{self} - ([Hidden] Send Bytes) - Semaphore timeout expired."
)