summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-13 18:10:07 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-13 18:10:07 +0000
commitdbe11e93f1ab109f2bf16caa3fccc6bdaad49d81 (patch)
treea6031d1067661fdb0a802027ae7240c4ca7a3c84
parent257f75d5a57fd74b262cda6e3f8361cb9a00e2f5 (diff)
downloadportage-dbe11e93f1ab109f2bf16caa3fccc6bdaad49d81.tar.gz
portage-dbe11e93f1ab109f2bf16caa3fccc6bdaad49d81.tar.bz2
portage-dbe11e93f1ab109f2bf16caa3fccc6bdaad49d81.zip
Bug #281355 - Handle IndexError inside reconstruct_eclasses().
svn path=/main/trunk/; revision=14015
-rw-r--r--pym/portage/cache/template.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/cache/template.py b/pym/portage/cache/template.py
index e78216338..97adb1058 100644
--- a/pym/portage/cache/template.py
+++ b/pym/portage/cache/template.py
@@ -224,6 +224,9 @@ def reconstruct_eclasses(cpv, eclass_string):
# The old format contains paths that will be discarded.
for x in xrange(0, len(eclasses), 3):
d[eclasses[x]] = (eclasses[x + 1], long(eclasses[x + 2]))
+ except IndexError:
+ raise cache_errors.CacheCorruption(cpv,
+ "_eclasses_ was of invalid len %i" % len(eclasses))
except ValueError:
raise cache_errors.CacheCorruption(cpv, "_eclasses_ mtime conversion to long failed")
del eclasses