bug: fix win error check not being cross platform

This commit is contained in:
Upstream Data
2022-11-12 14:51:10 -07:00
parent 8a6577c8aa
commit ee4f2cd87d

View File

@@ -98,7 +98,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 e.winerror == "121":
if getattr(e, "winerror") == "121":
logging.warning("Semaphore Timeout has Expired.")
return b"{}"