summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-13 03:32:16 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-13 03:32:16 +0000
commit66a5f328ffdccd4792dc9cd42db440dca6085596 (patch)
tree9ad0e8ae51d03f5dc56cdfc36dcba23d994f3d46
parentf299bc556c851e1d3794b17b72770c0818525fb4 (diff)
downloadportage-66a5f328ffdccd4792dc9cd42db440dca6085596.tar.gz
portage-66a5f328ffdccd4792dc9cd42db440dca6085596.tar.bz2
portage-66a5f328ffdccd4792dc9cd42db440dca6085596.zip
Use grabfile() instead of grablines(), to ignore empty lines.
svn path=/main/trunk/; revision=11872
-rw-r--r--pym/portage/news.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/news.py b/pym/portage/news.py
index ed739c23e..d26a3ab8d 100644
--- a/pym/portage/news.py
+++ b/pym/portage/news.py
@@ -11,7 +11,7 @@ import logging
import os
import re
from portage.util import apply_permissions, ensure_dirs, \
- grablines, normalize_path, write_atomic, writemsg_level
+ grabfile, normalize_path, write_atomic, writemsg_level
from portage.data import portage_gid
from portage.dep import isvalidatom
from portage.locks import lockfile, unlockfile
@@ -100,9 +100,9 @@ class NewsManager(object):
unread_filename = self._unread_filename(repoid)
unread_lock = lockfile(unread_filename, wantnewlockfile=1)
try:
- unread = set(grablines(unread_filename))
+ unread = set(grabfile(unread_filename))
unread_orig = unread.copy()
- skip = set(grablines(skip_filename))
+ skip = set(grabfile(skip_filename))
skip_orig = skip.copy()
updates = []
@@ -156,7 +156,7 @@ class NewsManager(object):
except (InvalidLocation, OperationNotPermitted, PermissionDenied):
return 0
try:
- return len(grablines(unread_filename))
+ return len(grabfile(unread_filename))
finally:
if unread_lock:
unlockfile(unread_lock)