components: fix pycodestyle E721 warnings

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan committed 2023-07-30 15:34:56 -04:00
1 parent f487de77bc
commit 7c8d68c0a1
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -482,7 +482,7 @@ class MQTTClient(APITransport, Subscribable):
except asyncio.CancelledError:
raise
except Exception as e:
if type(last_err) != type(e) or last_err.args != e.args:
if type(last_err) is not type(e) or last_err.args != e.args:
logging.exception("MQTT Connection Error")
last_err = e
continue
+2 -2
View File
@@ -447,7 +447,7 @@ class HTTPDevice(PowerDevice):
except asyncio.CancelledError:
raise
except Exception as e:
if type(last_err) != type(e) or last_err.args != e.args:
if type(last_err) is not type(e) or last_err.args != e.args:
logging.exception(f"Device Init Error: {self.name}")
last_err = e
await asyncio.sleep(5.)
@@ -887,7 +887,7 @@ class TPLinkSmartPlug(PowerDevice):
except asyncio.CancelledError:
raise
except Exception as e:
if type(last_err) != type(e) or last_err.args != e.args:
if type(last_err) is not type(e) or last_err.args != e.args:
logging.exception(f"Device Init Error: {self.name}")
last_err = e
await asyncio.sleep(5.)