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 D5352138010 for ; Thu, 18 Oct 2012 01:24:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8952E01DC; Thu, 18 Oct 2012 01:24:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 428FEE01DC for ; Thu, 18 Oct 2012 01:24:47 +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 A4AF433D759 for ; Thu, 18 Oct 2012 01:24:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 47C3BE5436 for ; Thu, 18 Oct 2012 01:24:45 +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: <1350523391.b0d85ce135496bb241d2d5714ac330710dfa0b72.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_async/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/_async/PopenProcess.py X-VCS-Directories: pym/portage/util/_async/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: b0d85ce135496bb241d2d5714ac330710dfa0b72 X-VCS-Branch: master Date: Thu, 18 Oct 2012 01:24:45 +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: 360b9e9f-66cf-44b0-a6af-60846b4ab095 X-Archives-Hash: 779ac66c671158ae641f67b70e3d9b56 commit: b0d85ce135496bb241d2d5714ac330710dfa0b72 Author: Zac Medico gentoo org> AuthorDate: Thu Oct 18 01:23:11 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Oct 18 01:23:11 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b0d85ce1 PopenProcess: child_watch_add if no pipe_reader --- pym/portage/util/_async/PopenProcess.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pym/portage/util/_async/PopenProcess.py b/pym/portage/util/_async/PopenProcess.py index 37d32f2..2fc56d2 100644 --- a/pym/portage/util/_async/PopenProcess.py +++ b/pym/portage/util/_async/PopenProcess.py @@ -7,13 +7,15 @@ class PopenProcess(SubProcess): __slots__ = ("pipe_reader", "proc",) - def __init__(self, **kwargs): - SubProcess.__init__(self, **kwargs) + def _start(self): + self.pid = self.proc.pid self._registered = True - def _start(self): - if self.pipe_reader is not None: + if self.pipe_reader is None: + self._reg_id = self.scheduler.child_watch_add( + self.pid, self._child_watch_cb) + else: try: self.pipe_reader.scheduler = self.scheduler except AttributeError: