portdbapi.xmatch: fix unknown repo / return empty
authorZac Medico <zmedico@gentoo.org>
Sat, 24 Sep 2011 22:23:29 +0000 (15:23 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 24 Sep 2011 22:23:29 +0000 (15:23 -0700)
We want to return an empty list for the match-* methods, otherwise an
empty string.

pym/portage/dbapi/porttree.py

index 9a8f50826e8bd44f1c47b3573952926d6c40d6a5..d710d6404ff87f88b63474e092c32ed57d2b6f32 100644 (file)
@@ -849,7 +849,10 @@ class portdbapi(dbapi):
                if mydep.repo is not None:
                        mytree = self.treemap.get(mydep.repo)
                        if mytree is None:
-                               myval = []
+                               if level.startswith("match-"):
+                                       myval = []
+                               else:
+                                       myval = ""
 
                if myval is not None:
                        # Unknown repo, empty result.