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 1RwQkh-0003IS-E9 for garchives@archives.gentoo.org; Sun, 12 Feb 2012 04:09:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9BA0E03E0; Sun, 12 Feb 2012 04:09:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9DA6FE03E0 for ; Sun, 12 Feb 2012 04:09:19 +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 11DD41B4004 for ; Sun, 12 Feb 2012 04:09:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id BB08BE5400 for ; Sun, 12 Feb 2012 04:09:17 +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: Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/AbstractPollTask.py pym/_emerge/AsynchronousLock.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: fc42d39d0ac9043b7a480d914b12fa679e4e2785 Date: Sun, 12 Feb 2012 04:09:17 +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: e46ffe37-5294-47e5-840c-3c0018999f22 X-Archives-Hash: ebb0c2342071907a023304f5f7b90e1f commit: fc42d39d0ac9043b7a480d914b12fa679e4e2785 Author: Zac Medico gentoo org> AuthorDate: Sun Feb 12 04:08:59 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Feb 12 04:08:59 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dfc42d39d AbstractPollTask: merge _wait from subclass --- pym/_emerge/AbstractPollTask.py | 6 ++++++ pym/_emerge/AsynchronousLock.py | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTa= sk.py index 68282ef..af1c3ff 100644 --- a/pym/_emerge/AbstractPollTask.py +++ b/pym/_emerge/AbstractPollTask.py @@ -127,6 +127,12 @@ class AbstractPollTask(AsynchronousTask): self._unregister() self.wait() =20 + def _wait(self): + if self.returncode is not None: + return self.returncode + self._wait_loop() + return self.returncode + def _wait_loop(self, timeout=3DNone): =20 if timeout is None: diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLo= ck.py index c07df0b..587aa46 100644 --- a/pym/_emerge/AsynchronousLock.py +++ b/pym/_emerge/AsynchronousLock.py @@ -148,12 +148,6 @@ class _LockThread(AbstractPollTask): # There's currently no way to force thread termination. pass =20 - def _wait(self): - if self.returncode is not None: - return self.returncode - self._wait_loop() - return self.returncode - def unlock(self): if self._lock_obj is None: raise AssertionError('not locked') @@ -259,12 +253,6 @@ class _LockProcess(AbstractPollTask): self._proc.poll() return self.returncode =20 - def _wait(self): - if self.returncode is not None: - return self.returncode - self._wait_loop() - return self.returncode - def _output_handler(self, f, event): buf =3D None if event & self.scheduler.IO_IN: