1 |
commit: 79e2ff8b1bbda62eb1113f128c84ad8af50e24f8 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 7 01:40:25 2014 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Sep 30 00:42:27 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=79e2ff8b |
7 |
|
8 |
sync/controller.py: Use assert() on tasks, func |
9 |
|
10 |
--- |
11 |
pym/portage/sync/controller.py | 5 +++-- |
12 |
1 file changed, 3 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py |
15 |
index a5c93dc..21b57f4 100644 |
16 |
--- a/pym/portage/sync/controller.py |
17 |
+++ b/pym/portage/sync/controller.py |
18 |
@@ -36,8 +36,9 @@ class TaskHandler(object): |
19 |
|
20 |
def run_tasks(self, tasks, func, status=None, verbose=True, options=None): |
21 |
"""Runs the module tasks""" |
22 |
- if tasks is None or func is None: |
23 |
- return |
24 |
+ # Ensure we have a task and function |
25 |
+ assert(tasks) |
26 |
+ assert(func) |
27 |
for task in tasks: |
28 |
inst = task() |
29 |
show_progress = self.show_progress_bar and self.isatty |