* [gentoo-commits] portage r10433 - in main/trunk/pym: _emerge portage
@ 2008-05-26 23:16 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-05-26 23:16 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-05-26 23:16:13 +0000 (Mon, 26 May 2008)
New Revision: 10433
Modified:
main/trunk/pym/_emerge/__init__.py
main/trunk/pym/portage/__init__.py
Log:
Don't silently swallow instances of UnpicklingError since they are easily
triggered by storing instances of custom classes in a pickle.
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2008-05-26 23:05:46 UTC (rev 10432)
+++ main/trunk/pym/_emerge/__init__.py 2008-05-26 23:16:13 UTC (rev 10433)
@@ -1423,8 +1423,12 @@
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 \
Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py 2008-05-26 23:05:46 UTC (rev 10432)
+++ main/trunk/pym/portage/__init__.py 2008-05-26 23:16:13 UTC (rev 10433)
@@ -6550,7 +6550,11 @@
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:
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-26 23:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26 23:16 [gentoo-commits] portage r10433 - in main/trunk/pym: _emerge portage Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox