[PATCH] do not open-code task_pending()
- From: Vincent Legoll <vincent legoll gmail com>
- To: meld-list <meld-list gnome org>
- Subject: [PATCH] do not open-code task_pending()
- Date: Thu, 19 Mar 2009 10:32:42 +0100
Reuse the task_pending() code instead of open-coding it.
--
Vincent Legoll
Index: task.py
===================================================================
--- task.py (revision 1266)
+++ task.py (working copy)
@@ -103,14 +103,14 @@
r = self.iteration()
if r:
return r
- return len(self.tasks) != 0
+ return self.tasks_pending()
def complete_tasks(self):
"""Run all currently added tasks to completion.
Tasks added after the call to complete_tasks are not run.
"""
- while len(self.tasks):
+ while self.tasks_pending():
self.iteration()
def tasks_pending(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]