From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RvPGK-0002EV-Ll for garchives@archives.gentoo.org; Thu, 09 Feb 2012 08:21:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19004E0453; Thu, 9 Feb 2012 08:21:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E09ABE0453 for ; Thu, 9 Feb 2012 08:21:44 +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 590081B402B for ; Thu, 9 Feb 2012 08:21:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 1DAEEE53FF for ; Thu, 9 Feb 2012 08:21:43 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <31fc2c97563eaa57ebf890d728f45f859c5520bf.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/QueueScheduler.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 31fc2c97563eaa57ebf890d728f45f859c5520bf Date: Thu, 9 Feb 2012 08:21:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d948bc4d-474c-4871-84a2-be62269110b3 X-Archives-Hash: d875050cafbf7cc6a7e07962ac314b01 commit: 31fc2c97563eaa57ebf890d728f45f859c5520bf Author: Zac Medico gentoo org> AuthorDate: Thu Feb 9 08:21:24 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Feb 9 08:21:24 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D31fc2c97 QueueScheduler: fix for IpcDaemonTestCase Use a StopIteration exception to jump out of EventLoop.iterate() before the poll loop. --- pym/_emerge/QueueScheduler.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/QueueScheduler.py b/pym/_emerge/QueueScheduler.p= y index 99cfb23..e34758a 100644 --- a/pym/_emerge/QueueScheduler.py +++ b/pym/_emerge/QueueScheduler.py @@ -38,7 +38,7 @@ class QueueScheduler(PollScheduler): if timeout is not None: def timeout_callback(): timeout_callback.timed_out =3D True - return False + raise StopIteration() timeout_callback.timed_out =3D False timeout_callback.timeout_id =3D self.sched_iface.timeout_add( timeout, timeout_callback) @@ -53,6 +53,8 @@ class QueueScheduler(PollScheduler): timeout_callback.timed_out) and self._running_job_count(): self.sched_iface.iteration() =20 + except StopIteration: + pass finally: if timeout_callback is not None: self.sched_iface.unregister(timeout_callback.timeout_id)