commit:     dcfa5037f819bb6b5efe71dd0c983df7e0652c5c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  7 01:40:25 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec  1 21:49:41 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dcfa5037

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 a5c93dc..21b57f4 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

Reply via email to