projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22b7caa
)
Use isinstance() instead of handling TypeError.
author
Zac Medico
<zmedico@gentoo.org>
Tue, 10 Jun 2008 04:48:51 +0000
(
04:48
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Tue, 10 Jun 2008 04:48:51 +0000
(
04:48
-0000)
svn path=/main/trunk/; revision=10638
pym/portage/dbapi/vartree.py
patch
|
blob
|
history
diff --git
a/pym/portage/dbapi/vartree.py
b/pym/portage/dbapi/vartree.py
index 190157b886aa65b5dd512be1e2e6d16a6ca35c88..f57555483a8e871a55c388d08e65595bca43ff26 100644
(file)
--- a/
pym/portage/dbapi/vartree.py
+++ b/
pym/portage/dbapi/vartree.py
@@
-996,10
+996,8
@@
class vardbapi(dbapi):
pkgs = base_names.get(name_hash)
if pkgs is not None:
for hash_value in pkgs:
- try:
- if len(hash_value) != 3:
- continue
- except TypeError:
+ if not isinstance(hash_value, tuple) or \
+ len(hash_value) != 3:
continue
cpv, counter, mtime = hash_value
if not isinstance(cpv, basestring):