From: Zac Medico Date: Sun, 22 Mar 2009 08:37:07 +0000 (-0000) Subject: Add a temporary workaround for bug #263081 (partially reverts r12757). X-Git-Tag: v2.2_rc27~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fd09d707a3d8d22b91b8c279e5a0b2e4d3d659ae;p=portage.git Add a temporary workaround for bug #263081 (partially reverts r12757). svn path=/main/trunk/; revision=13141 --- diff --git a/pym/portage/cache/sqlite.py b/pym/portage/cache/sqlite.py index aa5c30468..6588b3cc7 100644 --- a/pym/portage/cache/sqlite.py +++ b/pym/portage/cache/sqlite.py @@ -164,6 +164,18 @@ class database(fs_template.FsBased): if k not in internal_columns: d[k] = result[0][column_index] + # As a temporary workaround for bug #263081, convert unicode strings + # to raw byte strings. This helps to potential unicode errors that can + # be triggered elsewhere when attempting to join unicode strings with + # raw byte strings. TODO: Convert all string handling code to use + # unicode strings instead of raw byte strings (required for py3k + # compatibility). + for k, v in d.iteritems(): + try: + d[k] = str(v) + except UnicodeEncodeError: + pass + return d def _setitem(self, cpv, values):