summaryrefslogtreecommitdiffstats
path: root/pym/portage/news.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/news.py')
-rw-r--r--pym/portage/news.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/news.py b/pym/portage/news.py
index 866e5b025..031e98c8c 100644
--- a/pym/portage/news.py
+++ b/pym/portage/news.py
@@ -250,10 +250,11 @@ class NewsItem(object):
return self._valid
def parse(self):
- lines = io.open(_unicode_encode(self.path,
+ f = io.open(_unicode_encode(self.path,
encoding=_encodings['fs'], errors='strict'),
- mode='r', encoding=_encodings['content'], errors='replace'
- ).readlines()
+ mode='r', encoding=_encodings['content'], errors='replace')
+ lines = f.readlines()
+ f.close()
self.restrictions = {}
invalids = []
for i, line in enumerate(lines):