I've noticed that monitor_db.py issues a SyntaxWarning
as soon as it is started:

19:56:55 INFO | Killing monitor_db
19:56:55 INFO | STARTING monitor_db with log file
/usr/local/autotest/logs/scheduler.log.2010-04-15-19.56.55
/usr/local/autotest/scheduler/monitor_db.py:1779: SyntaxWarning:
assertion is always true, perhaps remove parentheses?
  assert (self.TASK_TYPE is not None,

I noticed that the whole statement fits under 80 chars,
so the parenthesis can be removed safely, getting rid of
the warning.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 scheduler/monitor_db.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index 2f4f0d5..cb0f656 100755
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -1776,8 +1776,7 @@ class SpecialAgentTask(AgentTask, TaskWithJobKeyvals):
     def __init__(self, task, extra_command_args):
         super(SpecialAgentTask, self).__init__()
 
-        assert (self.TASK_TYPE is not None,
-                'self.TASK_TYPE must be overridden')
+        assert self.TASK_TYPE is not None, 'self.TASK_TYPE must be overridden'
 
         self.host = scheduler_models.Host(id=task.host.id)
         self.queue_entry = None
-- 
1.6.6.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to