Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] bintree.populate: binhost connection failure triggers TypeError (bug 532784)
Date: Mon, 04 May 2015 06:37:58
Message-Id: 554713C0.7070505@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] bintree.populate: binhost connection failure triggers TypeError (bug 532784) by Brian Dolbec
1 On 05/03/2015 11:25 PM, Brian Dolbec wrote:
2 > Isn't this backwards from what was reported. It generated a
3 > UnicodeDecodeError when using additional args to unicode().
4
5 It was actually a TypeError.
6
7 > It needed
8 > to convert it to string so errors= needed to not be passed in.
9
10 Yeah, the first unicode call fixes that.
11
12 If a UnicodeDecodeError is then raised (not a TypeError), the second
13 unicode call decodes the UnicodeError.object attribute, which is
14 guaranteed to be a string that can be passed to unicode using the three
15 argument form.
16 --
17 Thanks,
18 Zac

Replies