From: donghee yang Date: Thu, 29 Nov 2012 07:00:23 +0000 (+0900) Subject: [Title] Fixed a bug about canceling job with no project info X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01cbfa54632770b5e48eca6b9f68efb018a6a822;p=sdk%2Ftools%2Fsdk-build.git [Title] Fixed a bug about canceling job with no project info --- diff --git a/src/build_server/SocketJobRequestListener.rb b/src/build_server/SocketJobRequestListener.rb index 9de8ed0..93c9c9a 100644 --- a/src/build_server/SocketJobRequestListener.rb +++ b/src/build_server/SocketJobRequestListener.rb @@ -551,12 +551,17 @@ class SocketJobRequestListener 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