Skip to content

Commit

Permalink
src: type comparison fix
Browse files Browse the repository at this point in the history
Signed-off-by:  Eric Callahan <[email protected]>
  • Loading branch information
Arksine committed Jan 13, 2025
1 parent 7e765b6 commit 72ed175
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion moonraker/components/paneldue.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async def run_serial(self) -> None:
try:
self.ser_conn.open()
except (self.ser_conn.error, OSError) as e:
if type(last_exc) != type(e) and last_exc.args != e.args:
if type(last_exc) is not type(e) and last_exc.args != e.args:
logging.exception("PanelDue Serial Open Error")
last_exc = e
await asyncio.sleep(2.)
Expand Down
2 changes: 1 addition & 1 deletion moonraker/components/wled.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ async def run_serial(self) -> None:
try:
self.serial.open()
except (self.serial.error, OSError) as e:
if type(last_exc) != type(e) and last_exc.args != e.args:
if type(last_exc) is not type(e) and last_exc.args != e.args:
logging.exception("WLED Serial Open Error")
last_exc = e
await asyncio.sleep(2.)
Expand Down

0 comments on commit 72ed175

Please sign in to comment.