summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-16 16:37:46 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-16 16:37:46 +0000
commitb11d2e207c7798b6ac835165ab216c37eef80125 (patch)
tree356f7b8a2d3c0fb55e30d487183a86d912347195
parentfix a few typos in tests (diff)
downloadportage-multirepo-b11d2e207c7798b6ac835165ab216c37eef80125.tar.gz
portage-multirepo-b11d2e207c7798b6ac835165ab216c37eef80125.tar.bz2
portage-multirepo-b11d2e207c7798b6ac835165ab216c37eef80125.zip
If repo/profiles/news doesn't exist, return 0 updates
svn path=/main/trunk/; revision=5672
-rw-r--r--pym/portage_news.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage_news.py b/pym/portage_news.py
index 736ce3fd..7624bed2 100644
--- a/pym/portage_news.py
+++ b/pym/portage_news.py
@@ -60,6 +60,10 @@ class NewsManager(object):
timestamp = 0
path = os.path.join( self.portdb.getRepositoryPath( repoid ), self.NEWS_PATH )
+ # Skip reading news for repoid if the news dir does not exist. Requested by
+ # NightMorph :)
+ if not os.path.exists( path ):
+ return None
news = os.listdir( path )
updates = []
for item in news: