Bug #246821 - Avoid TypeError from binarytree.isremote() by returning early
authorZac Medico <zmedico@gentoo.org>
Sat, 15 Nov 2008 18:53:05 +0000 (18:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 15 Nov 2008 18:53:05 +0000 (18:53 -0000)
if self._remotepkgs is None due to PORTAGE_BINHOST being unset. (trunk r11951)

svn path=/main/branches/2.1.6/; revision=11952

pym/portage/dbapi/bintree.py

index 96a5b0afafbead1bdabc8917dcde88740ddc620f..000624819807f51a809123a3598d01b9c0379d4c 100644 (file)
@@ -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 \