From 7f563ee33b8897cc7c54ab734a12e1d934303a48 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 30 Apr 2008 19:45:54 +0000 Subject: [PATCH] Fix 2 more types.InstanceType comparisons that are broken by the transition of dbapi to new-style classes. (trunk r6188) svn path=/main/branches/2.1.2/; revision=10049 --- pym/portage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index 61f82698e..d90b4027d 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5818,7 +5818,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 mydb.categories: if mydb.cp_list(x+"/"+mykey,use_cache=use_cache): return x+"/"+mykey @@ -5826,7 +5826,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