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 841E61383CF for ; Thu, 10 Jan 2013 17:36:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 66EBD21C182; Thu, 10 Jan 2013 17:35:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 13F5421C176 for ; Thu, 10 Jan 2013 17:35:13 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8DE4C33DB69 for ; Thu, 10 Jan 2013 09:18:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 236D6E4075 for ; Thu, 10 Jan 2013 09:18:05 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1357809466.9fc0204ad78b998e589d2f232eceda5e018584d6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/_emirrordist/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/_emirrordist/FetchTask.py X-VCS-Directories: pym/portage/_emirrordist/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9fc0204ad78b998e589d2f232eceda5e018584d6 X-VCS-Branch: master Date: Thu, 10 Jan 2013 09:18:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b4a29296-771b-465d-866e-17632237cb91 X-Archives-Hash: 1eef8cee734382bb87aa2af6dd3b1adc commit: 9fc0204ad78b998e589d2f232eceda5e018584d6 Author: Zac Medico gentoo org> AuthorDate: Thu Jan 10 09:17:46 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jan 10 09:17:46 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9fc0204a FetchTask: avoid possible duplicate URI --- pym/portage/_emirrordist/FetchTask.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/portage/_emirrordist/FetchTask.py b/pym/portage/_emirrordist/FetchTask.py index 50e4242..107db56 100644 --- a/pym/portage/_emirrordist/FetchTask.py +++ b/pym/portage/_emirrordist/FetchTask.py @@ -255,8 +255,10 @@ class FetchTask(CompositeTask): if uri not in self._tried_uris: return uri - if self._primaryuri_stack: - return self._primaryuri_stack.pop() + while self._primaryuri_stack: + uri = self._primaryuri_stack.pop() + if uri not in self._tried_uris: + return uri return None