public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] binarytree.get_pkgindex_uri: handle --gebinpkg=n (bug 549666)
@ 2015-05-16 19:05 Zac Medico
  0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2015-05-16 19:05 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

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
---
 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):
-- 
2.3.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-16 19:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-16 19:05 [gentoo-portage-dev] [PATCH] binarytree.get_pkgindex_uri: handle --gebinpkg=n (bug 549666) Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox