From 45ff8239f28ef4ba3dd47b016147eccceeaa26e0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 26 May 2008 23:29:25 +0000 Subject: Don't silently swallow instances of UnpicklingError since they are easily triggered by storing instances of custom classes in a pickle. (trunk r10432:10434) svn path=/main/branches/2.1.2/; revision=10435 --- bin/emerge | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/emerge b/bin/emerge index acb42e4f2..424fbdc91 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1557,8 +1557,11 @@ class BlockerCache(DictMixin): self._cache_data = mypickle.load() f.close() del f - except (IOError, OSError, EOFError, cPickle.UnpicklingError): - pass + except (IOError, OSError, EOFError, cPickle.UnpicklingError), e: + if isinstance(e, cPickle.UnpicklingError): + writemsg("!!! Error loading '%s': %s\n" % \ + (self._cache_filename, str(e)), noiselevel=-1) + del e cache_valid = self._cache_data and \ isinstance(self._cache_data, dict) and \ self._cache_data.get("version") == self._cache_version and \ -- cgit v1.2.3-1-g7c22