From d8a49f2be8c36986cc323782d62cb0aab655ea4b Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Fri, 31 May 2024 16:52:42 +0200 Subject: [PATCH] Lint --- src/stacosys/service/rssfeed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stacosys/service/rssfeed.py b/src/stacosys/service/rssfeed.py index 069448f..9c9ebe0 100644 --- a/src/stacosys/service/rssfeed.py +++ b/src/stacosys/service/rssfeed.py @@ -52,5 +52,5 @@ class Rss: lastBuildDate=datetime.now(), items=items, ) - # pylint: disable=consider-using-with - rss.write_xml(open(self._rss_file, "w", encoding="utf-8"), encoding="utf-8") + with open(self._rss_file, "w", encoding="utf-8") as outfile: + rss.write_xml(outfile, encoding="utf-8")