From: Zac Medico Date: Tue, 30 Nov 2010 20:19:13 +0000 (-0800) Subject: vardbapi: unicode safe UnpicklingError message X-Git-Tag: v2.2.0_alpha7~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4deaa35787bfc52ec937f7ba9714706d9ac20da2;p=portage.git vardbapi: unicode safe UnpicklingError message Thanks to Fabio Erculiani for reporting a UnicodeDecodeError here. --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index fe3262655..e6e2de6a6 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -482,8 +482,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 \