From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3D36F138010 for ; Sun, 7 Oct 2012 23:40:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C6674E04BA; Sun, 7 Oct 2012 23:40:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 03534E0458 for ; Sun, 7 Oct 2012 23:40:04 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3782833D73F for ; Sun, 7 Oct 2012 23:40:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id EE2D3E5444 for ; Sun, 7 Oct 2012 23:40:01 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1349653009.2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/api.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1 X-VCS-Branch: master Date: Sun, 7 Oct 2012 23:40:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1f27a987-df21-4210-9a81-f2f3c09ae9d3 X-Archives-Hash: 3f8a673d713652710839551a240873f0 commit: 2bc0b7478a14a9bf95a2e3728ed5a5f8d755e9b1 Author: Brian Dolbec gentoo org> AuthorDate: Sun Oct 7 23:36:49 2012 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sun Oct 7 23:36:49 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=2bc0b747 fix an "Invalid repoID" assertion error when it does not get a valid repoID in the news reporting. --- layman/api.py | 4 +++- 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)