components: fix pycodestyle E721 warnings

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-07-30 15:34:56 -04:00
parent f487de77bc
commit 7c8d68c0a1
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
2 changed files with 3 additions and 3 deletions

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

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.)