summaryrefslogtreecommitdiffstats
path: root/pym/portage_news.py
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 /pym/portage_news.py
parent15cb29669b045deaf4e43b6f028f67a7b925f894 (diff)
downloadportage-b11d2e207c7798b6ac835165ab216c37eef80125.tar.gz
portage-b11d2e207c7798b6ac835165ab216c37eef80125.tar.bz2
portage-b11d2e207c7798b6ac835165ab216c37eef80125.zip
If repo/profiles/news doesn't exist, return 0 updates
svn path=/main/trunk/; revision=5672
Diffstat (limited to 'pym/portage_news.py')
-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 736ce3fdc..7624bed2d 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: