summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-06 20:05:04 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-06 20:05:04 +0000
commit12215e7324eac090564508642c779208f12795c4 (patch)
tree0ff0cbd6277d57b5a9e069ec504f6208e6a70457
parent12ff7bbf7bd8fdba6509bd3e72b835a13b058474 (diff)
downloadportage-12215e7324eac090564508642c779208f12795c4.tar.gz
portage-12215e7324eac090564508642c779208f12795c4.tar.bz2
portage-12215e7324eac090564508642c779208f12795c4.zip
Fix 2 more types.InstanceType comparisons that are broken by the transition of dbapi to new-style classes.
svn path=/main/trunk/; revision=6188
-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