BuildCommServer.send(req, "\"#{cancel_job.id}, #{cancel_job.get_sub_jobs().map{|x| x.id}.join(", ")}\" will be canceled")
cancel_job.cancel_state = "INIT"
else
- if not check_project_password( cancel_job.get_project, tok[2], req) then
- BuildCommServer.send(req, "Project's password is not matched!!")
- raise "Project's password is not matched!!"
+ prj = cancel_job.get_project()
+ if not prj.nil? then
+ if not check_project_password( prj, tok[2], req) then
+ BuildCommServer.send(req, "Project's password is not matched!!")
+ raise "Project's password is not matched!!"
+ else
+ BuildCommServer.send(req, "\"#{cancel_job.id}\" will be canceled")
+ cancel_job.cancel_state = "INIT"
+ end
else
- BuildCommServer.send(req, "\"#{cancel_job.id}\" will be canceled")
- cancel_job.cancel_state = "INIT"
+ BuildCommServer.send(req, "Cannot cancel the job \"#{cancel_job.id}\"")
end
end
else