Improved exception handling

This commit is contained in:
Maximilian Giller 2023-12-29 22:50:13 +01:00
parent 6a85e24096
commit c25d099f0c

View file

@ -53,10 +53,7 @@ async def log_temperature():
async def display_time():
while True:
try:
matrix_display.show_current_time()
except Exception as e:
raise "Failed to display time on the matrix display: {e}"
matrix_display.show_current_time()
seconds_until_next_minute = 60 - datetime.now().second
await asyncio.sleep(seconds_until_next_minute)