From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 08E341382C5 for ; Sat, 28 Apr 2018 21:57:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 20DE9E0817; Sat, 28 Apr 2018 21:57:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED4FCE0817 for ; Sat, 28 Apr 2018 21:57:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 70601335C9E for ; Sat, 28 Apr 2018 21:57:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 70B89287 for ; Sat, 28 Apr 2018 21:57:06 +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: <1524952546.27801746e9aa7e9ffc02408b2b005aa106c0d8a7.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/_emirrordist/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/_emirrordist/MirrorDistTask.py X-VCS-Directories: pym/portage/_emirrordist/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 27801746e9aa7e9ffc02408b2b005aa106c0d8a7 X-VCS-Branch: master Date: Sat, 28 Apr 2018 21:57:06 +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: 546a451c-275f-43e9-b392-375680345cf6 X-Archives-Hash: fbc2ed43dd587ccabdb99a245fadaa25 commit: 27801746e9aa7e9ffc02408b2b005aa106c0d8a7 Author: Zac Medico gentoo org> AuthorDate: Sat Apr 28 21:51:01 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Apr 28 21:55:46 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=27801746 MirrorDistTask: fix deprecated _wait usage (bug 653856) Override AsynchronousTask._async_wait() for cleanup, since AsynchronousTask._wait() is deprecated. Bug: https://bugs.gentoo.org/653856 pym/portage/_emirrordist/MirrorDistTask.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pym/portage/_emirrordist/MirrorDistTask.py b/pym/portage/_emirrordist/MirrorDistTask.py index 48d0f7cf2..a0912d673 100644 --- a/pym/portage/_emirrordist/MirrorDistTask.py +++ b/pym/portage/_emirrordist/MirrorDistTask.py @@ -1,4 +1,4 @@ -# Copyright 2013-2014 Gentoo Foundation +# Copyright 2013-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import errno @@ -46,7 +46,7 @@ class MirrorDistTask(CompositeTask): self._assert_current(fetch) if self._was_cancelled(): - self.wait() + self._async_wait() return if self._config.options.delete: @@ -63,7 +63,7 @@ class MirrorDistTask(CompositeTask): self._assert_current(deletion) if self._was_cancelled(): - self.wait() + self._async_wait() return self._post_deletion() @@ -80,7 +80,7 @@ class MirrorDistTask(CompositeTask): self.returncode = os.EX_OK self._current_task = None - self.wait() + self._async_wait() def _update_recycle_db(self): @@ -242,5 +242,15 @@ class MirrorDistTask(CompositeTask): self._async_wait() def _wait(self): + """ + Deprecated. Use _async_wait() instead. + """ CompositeTask._wait(self) self._cleanup() + + def _async_wait(self): + """ + Override _async_wait to call self._cleanup(). + """ + self._cleanup() + super(CompositeTask, self)._async_wait()