components: fix pycodestyle E721 warnings
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
f487de77bc
commit
7c8d68c0a1
|
@ -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
|
||||
|
|
|
@ -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.)
|
||||
|
|
Loading…
Reference in New Issue