From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2CD54138CCC for ; Mon, 4 May 2015 06:37:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25622E08CD; Mon, 4 May 2015 06:37:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8E628E08C8 for ; Mon, 4 May 2015 06:37:56 +0000 (UTC) Received: from [192.168.0.13] (ip174-67-205-96.oc.oc.cox.net [174.67.205.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 52CD0340AB7 for ; Mon, 4 May 2015 06:37:55 +0000 (UTC) Message-ID: <554713C0.7070505@gentoo.org> Date: Sun, 03 May 2015 23:37:52 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] bintree.populate: binhost connection failure triggers TypeError (bug 532784) References: <1430715153-27893-1-git-send-email-zmedico@gentoo.org> <20150503232503.54706511.dolsen@gentoo.org> In-Reply-To: <20150503232503.54706511.dolsen@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Archives-Salt: ca8dbf50-0abf-4c34-8f41-9f521a7289be X-Archives-Hash: db251df24ea1fcaa20705f265fdc830d On 05/03/2015 11:25 PM, Brian Dolbec wrote: > Isn't this backwards from what was reported. It generated a > UnicodeDecodeError when using additional args to unicode(). It was actually a TypeError. > It needed > to convert it to string so errors= needed to not be passed in. Yeah, the first unicode call fixes that. If a UnicodeDecodeError is then raised (not a TypeError), the second unicode call decodes the UnicodeError.object attribute, which is guaranteed to be a string that can be passed to unicode using the three argument form. -- Thanks, Zac