summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 3a51aa7ca..6457e5660 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4328,7 +4328,7 @@ def key_expand(mykey, mydb=None, use_cache=1, settings=None):
virts = settings.getvirtuals("/")
virts_p = settings.get_virts_p("/")
if len(mysplit)==1:
- if mydb and type(mydb)==types.InstanceType:
+ if hasattr(mydb, "cp_list"):
for x in settings.categories:
if mydb.cp_list(x+"/"+mykey,use_cache=use_cache):
return x+"/"+mykey
@@ -4336,7 +4336,7 @@ def key_expand(mykey, mydb=None, use_cache=1, settings=None):
return(virts_p[mykey][0])
return "null/"+mykey
elif mydb:
- if type(mydb)==types.InstanceType:
+ if hasattr(mydb, "cp_list"):
if (not mydb.cp_list(mykey,use_cache=use_cache)) and virts and virts.has_key(mykey):
return virts[mykey][0]
return mykey