Skip to content

Commit

Permalink
Fix babel import and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
gmt2001 committed Jun 15, 2021
1 parent bd584c1 commit e30ace2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyouroboros/notifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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 = [
Expand Down

0 comments on commit e30ace2

Please sign in to comment.