Fix types.InstanceType test which is failing now for some reason.
authorZac Medico <zmedico@gentoo.org>
Sat, 3 Mar 2007 01:53:18 +0000 (01:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 Mar 2007 01:53:18 +0000 (01:53 -0000)
svn path=/main/trunk/; revision=6137

pym/portage/__init__.py

index 1b7cf94bf05c18e2fd2a0e2147799bfb64e4d30e..f5e00b06007be87a2f924197d9b9e7fefe24450d 100644 (file)
@@ -4358,7 +4358,7 @@ def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
                        mykey=mycpv
                if mydb and virts and mykey in virts:
                        writemsg("mydb.__class__: %s\n" % (mydb.__class__), 1)
-                       if type(mydb)==types.InstanceType:
+                       if hasattr(mydb, "cp_list"):
                                if not mydb.cp_list(mykey, use_cache=use_cache):
                                        writemsg("virts[%s]: %s\n" % (str(mykey),virts[mykey]), 1)
                                        mykey_orig = mykey[:]