summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-10 04:48:51 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-10 04:48:51 +0000
commita29dd312ba6935871c9652efa317eef329e487de (patch)
treeff21d64586ab3f0f54c87fa1904ab6504542ed53
parent22b7caabee6f266794be94d336510bbc07e9d5bc (diff)
downloadportage-a29dd312ba6935871c9652efa317eef329e487de.tar.gz
portage-a29dd312ba6935871c9652efa317eef329e487de.tar.bz2
portage-a29dd312ba6935871c9652efa317eef329e487de.zip
Use isinstance() instead of handling TypeError.
svn path=/main/trunk/; revision=10638
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 190157b88..f57555483 100644
--- 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):