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 70DA8138CCE for ; Sat, 16 May 2015 19:14:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02E04E088C; Sat, 16 May 2015 19:14:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A70D7E088C for ; Sat, 16 May 2015 19:14:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CC374340F4E for ; Sat, 16 May 2015 19:14:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7B3FA9AA for ; Sat, 16 May 2015 19:14:20 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1431803603.25c31a95fd1421952f78ed36dab69d8ff8f1a877.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/bintree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 25c31a95fd1421952f78ed36dab69d8ff8f1a877 X-VCS-Branch: master Date: Sat, 16 May 2015 19:14:20 +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: 9d65506f-c14b-4e44-80cd-522e9265760a X-Archives-Hash: 272abe6ffe0929f03db3dd21b129ef76 commit: 25c31a95fd1421952f78ed36dab69d8ff8f1a877 Author: Zac Medico gentoo org> AuthorDate: Sat May 16 19:03:45 2015 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat May 16 19:13:23 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=25c31a95 binarytree.get_pkgindex_uri: handle --gebinpkg=n (bug 549666) Since commit 328dd4712f88cbb8ef390ae9eb471afa1ef781d7, get_pkgindex_uri triggers AttributeError if --rebuild* options are used together with --getbinpkg=n. Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7") X-Gentoo-Bug: 549666 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549666 Acked-by: Brian Dolbec gentoo.org> pym/portage/dbapi/bintree.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 4043016..f415a63 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -1441,9 +1441,10 @@ class binarytree(object): def get_pkgindex_uri(self, cpv): """Returns the URI to the Packages file for a given package.""" uri = None - metadata = self._remotepkgs.get(self.dbapi._instance_key(cpv)) - if metadata is not None: - uri = metadata["PKGINDEX_URI"] + if self._remotepkgs is not None: + metadata = self._remotepkgs.get(self.dbapi._instance_key(cpv)) + if metadata is not None: + uri = metadata["PKGINDEX_URI"] return uri def gettbz2(self, pkgname):