diff --git a/src/stacosys/db/dao.py b/src/stacosys/db/dao.py index 5f21ae3..7088d87 100644 --- a/src/stacosys/db/dao.py +++ b/src/stacosys/db/dao.py @@ -20,7 +20,7 @@ def notify_comment(comment: Comment): def publish_comment(comment: Comment): # if published before notification is received if comment.notified == None: - db()(db().comment.id == comment.id).update(notified=datetime.now()) + db()(db().comment.id == comment.id).update(notified=datetime.now()) db()(db().comment.id == comment.id).update(published=datetime.now()) db().commit() diff --git a/src/stacosys/run.py b/src/stacosys/run.py index d311049..260e2a7 100644 --- a/src/stacosys/run.py +++ b/src/stacosys/run.py @@ -46,7 +46,7 @@ def configure_and_validate_mailer(config, logger): config.get(ConfigParameter.SMTP_LOGIN), config.get(ConfigParameter.SMTP_PASSWORD), ) - mailer.configure_destination(config.get(ConfigParameter.SITE_ADMIN_EMAIL)) + mailer.configure_destination(config.get(ConfigParameter.SITE_ADMIN_EMAIL)) try: if not mailer.check(): logger.error("Email configuration not working") diff --git a/src/stacosys/service/rssfeed.py b/src/stacosys/service/rssfeed.py index c9bea05..5c94d4e 100644 --- a/src/stacosys/service/rssfeed.py +++ b/src/stacosys/service/rssfeed.py @@ -8,7 +8,7 @@ import PyRSS2Gen from stacosys.db import dao -RFC_822_FORMAT = '%a, %d %b %Y %H:%M:%S +0000' +RFC_822_FORMAT = "%a, %d %b %Y %H:%M:%S +0000" class Rss: @@ -42,7 +42,7 @@ class Rss: link=item_link, description=markdownizer.convert(row.content), guid=PyRSS2Gen.Guid(f"{item_link}{row.id}"), - pubDate=self._to_rfc822(row.published) + pubDate=self._to_rfc822(row.published), ) ) @@ -58,5 +58,4 @@ class Rss: rss.write_xml(outfile, encoding="utf-8") def _to_rfc822(self, dt): - return dt.replace(tzinfo=timezone.utc) \ - .strftime('%a, %d %b %Y %H:%M:%S %z') + return dt.replace(tzinfo=timezone.utc).strftime("%a, %d %b %Y %H:%M:%S %z")