summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 932d6957e..a24f471e7 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7479,10 +7479,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):