From e30ace23129e6566da0b873390142518bb4d2795 Mon Sep 17 00:00:00 2001 From: gmt2001 Date: Tue, 15 Jun 2021 05:03:58 -0400 Subject: [PATCH] Fix babel import and usage --- pyouroboros/notifiers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyouroboros/notifiers.py b/pyouroboros/notifiers.py index a43e28f..1564828 100644 --- a/pyouroboros/notifiers.py +++ b/pyouroboros/notifiers.py @@ -3,7 +3,7 @@ from logging import getLogger from datetime import datetime -from babel import format_datetime +from babel import dates from pytz import timezone class NotificationManager(object): @@ -49,8 +49,8 @@ def send(self, container_tuples=None, socket=None, kind='update', next_run=None, title = _('Ouroboros has started') body_fields = [ _('Host: %s') % self.config.hostname, - _('Time: %s') % format_datetime(None, format='full', tzinfo=timezone(self.config.tz), locale=self.config.language), - _('Next Run: %s') % format_datetime(next_run, format='full', tzinfo=timezone(self.config.tz), locale=self.config.language)] + _('Time: %s') % dates.format_datetime(None, format='full', tzinfo=timezone(self.config.tz), locale=self.config.language), + _('Next Run: %s') % dates.format_datetime(next_run, format='full', tzinfo=timezone(self.config.tz), locale=self.config.language)] elif kind == 'monitor': title = _('Ouroboros has detected updates!') body_fields = [