summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-15 18:53:05 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-15 18:53:05 +0000
commit9f47b473c185c6b4207db6dc8f20cc000af44887 (patch)
treeeb2c2d5c1c1cd658ef50fd665f8ce5f323339e5b
parentb233281793c70a96cc5fd466c1a2030854b2b62b (diff)
downloadportage-9f47b473c185c6b4207db6dc8f20cc000af44887.tar.gz
portage-9f47b473c185c6b4207db6dc8f20cc000af44887.tar.bz2
portage-9f47b473c185c6b4207db6dc8f20cc000af44887.zip
Bug #246821 - Avoid TypeError from binarytree.isremote() by returning early
if self._remotepkgs is None due to PORTAGE_BINHOST being unset. (trunk r11951) svn path=/main/branches/2.1.6/; revision=11952
-rw-r--r--pym/portage/dbapi/bintree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 96a5b0afa..000624819 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -970,7 +970,7 @@ class binarytree(object):
def isremote(self, pkgname):
"""Returns true if the package is kept remotely and it has not been
downloaded (or it is only partially downloaded)."""
- if pkgname not in self._remotepkgs:
+ if self._remotepkgs is None or pkgname not in self._remotepkgs:
return False
pkg_path = self.getname(pkgname)
if os.path.exists(pkg_path) and \