diff options
-rw-r--r-- | pym/_emerge/__init__.py | 8 | ||||
-rw-r--r-- | pym/portage/__init__.py | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index bf5c4aeea..b045b02f1 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1423,8 +1423,12 @@ 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 \ diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index f8dbc2d22..d9021a466 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -6550,7 +6550,11 @@ class MtimeDB(dict): d = mypickle.load() f.close() del f - except (IOError, OSError, EOFError, cPickle.UnpicklingError): + except (IOError, OSError, EOFError, cPickle.UnpicklingError), e: + if isinstance(e, cPickle.UnpicklingError): + writemsg("!!! Error loading '%s': %s\n" % \ + (filename, str(e)), noiselevel=-1) + del e d = {} if "old" in d: |