From 12215e7324eac090564508642c779208f12795c4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 6 Mar 2007 20:05:04 +0000 Subject: [PATCH] Fix 2 more types.InstanceType comparisons that are broken by the transition of dbapi to new-style classes. svn path=/main/trunk/; revision=6188 --- pym/portage/__init__.py | 4 ++-- 1 file 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 -- 2.26.2