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 7EBA61389E2 for ; Thu, 4 Dec 2014 20:16:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BECB0E090F; Thu, 4 Dec 2014 20:16:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED6D8E0900 for ; Thu, 4 Dec 2014 20:16:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3B21C340598 for ; Thu, 4 Dec 2014 20:16:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BF45B941 for ; Thu, 4 Dec 2014 20:16:10 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1417722994.7f28745b044f54862732e77185c0492667af42a5.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/controller.py X-VCS-Directories: pym/portage/sync/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 7f28745b044f54862732e77185c0492667af42a5 X-VCS-Branch: master Date: Thu, 4 Dec 2014 20:16:10 +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: fe6cbafc-c591-4ed3-b18d-e20585f5b21b X-Archives-Hash: 22065e249e3ec70dca3d918b8cfd9dfe Message-ID: <20141204201610.dTnvLZqEpceC4Mzf5hMnnfEcJc339DNwmakL3rPgng8@z> commit: 7f28745b044f54862732e77185c0492667af42a5 Author: Brian Dolbec gentoo org> AuthorDate: Sun Sep 7 01:40:25 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Dec 4 19:56:34 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7f28745b sync/controller.py: Use assert() on tasks, func --- pym/portage/sync/controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py index e1aabb7..9e483e9 100644 --- a/pym/portage/sync/controller.py +++ b/pym/portage/sync/controller.py @@ -36,8 +36,9 @@ class TaskHandler(object): def run_tasks(self, tasks, func, status=None, verbose=True, options=None): """Runs the module tasks""" - if tasks is None or func is None: - return + # Ensure we have a task and function + assert(tasks) + assert(func) for task in tasks: inst = task() show_progress = self.show_progress_bar and self.isatty