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 50FF8138A3F for ; Sun, 5 Apr 2015 17:58:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 66BA2E089F; Sun, 5 Apr 2015 17:58:01 +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 8CF37E0897 for ; Sun, 5 Apr 2015 17:58:00 +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 864423407BB for ; Sun, 5 Apr 2015 17:57:59 +0000 (UTC) Message-ID: <552177A5.60308@gentoo.org> Date: Sun, 05 Apr 2015 10:57:57 -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] fetch(): fix support for digest size=None References: <1428220769-3567-1-git-send-email-mgorny@gentoo.org> In-Reply-To: <1428220769-3567-1-git-send-email-mgorny@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 699fd966-24e8-47dd-9401-b6ab2a58b4ce X-Archives-Hash: 1ceac27c9d4e6eea7bb73c74edd1a33c On 04/05/2015 12:59 AM, Michał Górny wrote: > It seems that the code initially supported fetching without size > 'digest' but it got broken over time. Add proper conditionals to avoid > ugly failures in this case. If we're handling this case, then we should probably not assume that the dict contains a "size" key. So, we could check that dict.get("size") is not None. -- Thanks, Zac