aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2012-10-07 23:36:49 (GMT)
committerBrian Dolbec <dolsen@gentoo.org>2012-10-07 23:36:49 (GMT)
commit2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1 (patch)
tree822e62da696b92ca6d02e1f8addafdb85ebd2097
parentfix a typo. (diff)
downloadlayman-2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1.zip
layman-2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1.tar.gz
layman-2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1.tar.bz2
fix an "Invalid repoID" assertion error when it does not get a valid repoID in the news reporting.
-rwxr-xr-xlayman/api.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/layman/api.py b/layman/api.py
index 72258d4..8dda224 100755
--- a/layman/api.py
+++ b/layman/api.py
@@ -556,7 +556,9 @@ class LaymanAPI(object):
for repo in repos:
ovl = self._get_installed_db().select(repo)
ovl_path = os.path.join(ovl.config['storage'], repo)
- repo_names.append(portdb.getRepositoryName(ovl_path))
+ name = portdb.getRepositoryName(ovl_path)
+ if name:
+ repo_names.append(name)
self.output.debug("LaymanAPI: update_news(); repo_names = "
+ str(repo_names), 4)
news_counts = count_unread_news(portdb, vardb, repo_names)