alerts: don't append exception based alert, just draw it

This commit is contained in:
nemunaire 2023-01-19 14:59:50 +01:00
parent aeacc05bd3
commit 14273995b7
1 changed files with 2 additions and 2 deletions

View File

@ -161,11 +161,11 @@ class AlertsModule:
align = self.draw_alert(alert, width, image, draw, fnt_R, fnt_B, align, font_size)
except BaseException as e:
logging.exception(e)
self.alerts.append({
align = self.draw_alert({
"title": "Impossible de générer les alertes de " + alert.__name__,
"description": type(e).__name__ + ": " + (e.message if hasattr(e, 'message') else str(e)),
"icon": "wi-earthquake.png",
})
}, width, image, draw, fnt_R, fnt_B, align, font_size)
else:
align = self.draw_alert(alert, width, image, draw, fnt_R, fnt_B, align, font_size)