1 |
Author: zmedico |
2 |
Date: 2008-04-30 19:45:54 +0000 (Wed, 30 Apr 2008) |
3 |
New Revision: 10049 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/pym/portage.py |
7 |
Log: |
8 |
Fix 2 more types.InstanceType comparisons that are broken by |
9 |
the transition of dbapi to new-style classes. (trunk r6188) |
10 |
|
11 |
|
12 |
Modified: main/branches/2.1.2/pym/portage.py |
13 |
=================================================================== |
14 |
--- main/branches/2.1.2/pym/portage.py 2008-04-30 18:28:16 UTC (rev 10048) |
15 |
+++ main/branches/2.1.2/pym/portage.py 2008-04-30 19:45:54 UTC (rev 10049) |
16 |
@@ -5818,7 +5818,7 @@ |
17 |
virts = settings.getvirtuals("/") |
18 |
virts_p = settings.get_virts_p("/") |
19 |
if len(mysplit)==1: |
20 |
- if mydb and type(mydb)==types.InstanceType: |
21 |
+ if hasattr(mydb, "cp_list"): |
22 |
for x in mydb.categories: |
23 |
if mydb.cp_list(x+"/"+mykey,use_cache=use_cache): |
24 |
return x+"/"+mykey |
25 |
@@ -5826,7 +5826,7 @@ |
26 |
return(virts_p[mykey][0]) |
27 |
return "null/"+mykey |
28 |
elif mydb: |
29 |
- if type(mydb)==types.InstanceType: |
30 |
+ if hasattr(mydb, "cp_list"): |
31 |
if (not mydb.cp_list(mykey,use_cache=use_cache)) and virts and virts.has_key(mykey): |
32 |
return virts[mykey][0] |
33 |
return mykey |
34 |
|
35 |
-- |
36 |
gentoo-commits@l.g.o mailing list |