Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13141 - main/trunk/pym/portage/cache
Date: Sun, 22 Mar 2009 08:37:10
Message-Id: E1LlJB6-0006Bs-2k@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-03-22 08:37:07 +0000 (Sun, 22 Mar 2009)
3 New Revision: 13141
4
5 Modified:
6 main/trunk/pym/portage/cache/sqlite.py
7 Log:
8 Add a temporary workaround for bug #263081 (partially reverts r12757).
9
10
11 Modified: main/trunk/pym/portage/cache/sqlite.py
12 ===================================================================
13 --- main/trunk/pym/portage/cache/sqlite.py 2009-03-22 06:33:49 UTC (rev 13140)
14 +++ main/trunk/pym/portage/cache/sqlite.py 2009-03-22 08:37:07 UTC (rev 13141)
15 @@ -164,6 +164,18 @@
16 if k not in internal_columns:
17 d[k] = result[0][column_index]
18
19 + # As a temporary workaround for bug #263081, convert unicode strings
20 + # to raw byte strings. This helps to potential unicode errors that can
21 + # be triggered elsewhere when attempting to join unicode strings with
22 + # raw byte strings. TODO: Convert all string handling code to use
23 + # unicode strings instead of raw byte strings (required for py3k
24 + # compatibility).
25 + for k, v in d.iteritems():
26 + try:
27 + d[k] = str(v)
28 + except UnicodeEncodeError:
29 + pass
30 +
31 return d
32
33 def _setitem(self, cpv, values):