summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-15 18:51:59 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-15 18:51:59 +0000
commit01ae8fc886a6aaf9bdf40dcf939a66a79076f1f3 (patch)
treead378080a83c5f9a9e8d1010f9585edb03d67e05
parent66c0bbbd4f5a0e98a9df138e84b41b317c946cda (diff)
downloadportage-01ae8fc886a6aaf9bdf40dcf939a66a79076f1f3.tar.gz
portage-01ae8fc886a6aaf9bdf40dcf939a66a79076f1f3.tar.bz2
portage-01ae8fc886a6aaf9bdf40dcf939a66a79076f1f3.zip
Bug #246821 - Avoid TypeError from binarytree.isremote() by returning early
if self._remotepkgs is None due to PORTAGE_BINHOST being unset. svn path=/main/trunk/; revision=11951
-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 \