alerts: don't append exception based alert, just draw it
This commit is contained in:
parent
aeacc05bd3
commit
14273995b7
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user