gps pointed out that "== and != work in most cases but its better to use is
and is not as you'll never run into a case where someone's __eq__ or __ne__
method do the wrong thing."
Signed-off-by: Martin J. Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2533 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index db49221..9b2dfe7 100644
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -224,7 +224,7 @@
print 'killing', pid
if poll_fn is None:
poll_fn = get_proc_poll_fn(pid)
- if poll_fn() == None:
+ if poll_fn() is None:
os.kill(pid, signal.SIGCONT)
os.kill(pid, signal.SIGTERM)
@@ -1140,7 +1140,7 @@
def is_done(self):
- return self.active_task == None and self.queue.empty()
+ return self.active_task is None and self.queue.empty()
def start(self):