1 |
commit: 77b63ed6f9fc2f1c30dfb100ca12aef02f5f0240 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 24 22:23:29 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 24 22:23:29 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=77b63ed6 |
7 |
|
8 |
portdbapi.xmatch: fix unknown repo / return empty |
9 |
|
10 |
We want to return an empty list for the match-* methods, otherwise an |
11 |
empty string. |
12 |
|
13 |
--- |
14 |
pym/portage/dbapi/porttree.py | 5 ++++- |
15 |
1 files changed, 4 insertions(+), 1 deletions(-) |
16 |
|
17 |
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py |
18 |
index 9a8f508..d710d64 100644 |
19 |
--- a/pym/portage/dbapi/porttree.py |
20 |
+++ b/pym/portage/dbapi/porttree.py |
21 |
@@ -849,7 +849,10 @@ class portdbapi(dbapi): |
22 |
if mydep.repo is not None: |
23 |
mytree = self.treemap.get(mydep.repo) |
24 |
if mytree is None: |
25 |
- myval = [] |
26 |
+ if level.startswith("match-"): |
27 |
+ myval = [] |
28 |
+ else: |
29 |
+ myval = "" |
30 |
|
31 |
if myval is not None: |
32 |
# Unknown repo, empty result. |