Improved exception handling
This commit is contained in:
parent
6a85e24096
commit
c25d099f0c
1 changed files with 1 additions and 4 deletions
|
@ -53,10 +53,7 @@ async def log_temperature():
|
||||||
|
|
||||||
async def display_time():
|
async def display_time():
|
||||||
while True:
|
while True:
|
||||||
try:
|
matrix_display.show_current_time()
|
||||||
matrix_display.show_current_time()
|
|
||||||
except Exception as e:
|
|
||||||
raise "Failed to display time on the matrix display: {e}"
|
|
||||||
|
|
||||||
seconds_until_next_minute = 60 - datetime.now().second
|
seconds_until_next_minute = 60 - datetime.now().second
|
||||||
await asyncio.sleep(seconds_until_next_minute)
|
await asyncio.sleep(seconds_until_next_minute)
|
||||||
|
|
Loading…
Reference in a new issue