From 24add28602df1b752804f735d3b51fa16b9cdb83 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 21 Sep 2009 13:16:12 +0000 Subject: [PATCH] Make key_expand() always return Atom type. svn path=/main/trunk/; revision=14319 --- pym/portage/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index d4b44d29a..4b19cb9d9 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -8068,15 +8068,17 @@ def key_expand(mykey, mydb=None, use_cache=1, settings=None): if hasattr(mydb, "cp_list"): for x in mydb.categories: if mydb.cp_list(x+"/"+mykey,use_cache=use_cache): - return x+"/"+mykey + return dep.Atom(x + "/" + mykey) if mykey in virts_p: return(virts_p[mykey][0]) - return "null/"+mykey + return dep.Atom("null/" + mykey) elif mydb: if hasattr(mydb, "cp_list"): if not mydb.cp_list(mykey, use_cache=use_cache) and \ virts and mykey in virts: return virts[mykey][0] + if not isinstance(mykey, dep.Atom): + mykey = dep.Atom(mykey) return mykey def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None): -- 2.26.2