Răsfoiți Sursa

Handle EOFError (#105)

J. Nick Koston 1 an în urmă
părinte
comite
4ac2ff0602
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      switchbot/devices/device.py

+ 1 - 1
switchbot/devices/device.py

@@ -37,7 +37,7 @@ DEVICE_SET_EXTENDED_KEY = REQ_HEADER
 # Base key when encryption is set
 KEY_PASSWORD_PREFIX = "571"
 
-BLEAK_EXCEPTIONS = (AttributeError, BleakError, asyncio.exceptions.TimeoutError)
+BLEAK_EXCEPTIONS = (AttributeError, BleakError, EOFError, asyncio.exceptions.TimeoutError)
 
 # How long to hold the connection
 # to wait for additional commands for