Skip to content

Commit 1e523ae

Browse files
authored
Changed Error to Exception
Was getting exceptions when using Error and troubleshooting made it seem like that was causing it to skip receiving the method_request. When replaced with Exception, it started working. :)
1 parent 09bd112 commit 1e523ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def register_device():
6262
try:
6363
desired_colour = twin['reported']['colour']
6464
set_colour(desired_colour)
65-
except Error:
65+
except Exception as ex:
6666
print("Couldn't load twin,")
6767

6868
# listen for commands
@@ -109,4 +109,4 @@ async def main_loop():
109109
await device_client.disconnect()
110110

111111
if __name__ == '__main__':
112-
asyncio.run(main())
112+
asyncio.run(main())

0 commit comments

Comments
 (0)