From b5aa445c81192171423179385231583782d1523f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 30 Nov 2010 12:19:13 -0800 Subject: vardbapi: unicode safe UnpicklingError message Thanks to Fabio Erculiani for reporting a UnicodeDecodeError here. --- pym/portage/dbapi/vartree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym') diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 29e54ba69..d386880f4 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -481,8 +481,8 @@ class vardbapi(dbapi): del f except (IOError, OSError, EOFError, ValueError, pickle.UnpicklingError) as e: if isinstance(e, pickle.UnpicklingError): - writemsg(_("!!! Error loading '%s': %s\n") % \ - (self._aux_cache_filename, str(e)), noiselevel=-1) + writemsg(_unicode_decode(_("!!! Error loading '%s': %s\n")) % \ + (self._aux_cache_filename, e), noiselevel=-1) del e if not aux_cache or \ -- cgit v1.2.3-1-g7c22