From: Ed Bartosh Date: Sat, 10 Jan 2015 19:58:55 +0000 (+0200) Subject: Add placehoders for new actions X-Git-Tag: 1.0~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2caa536f235172dab09db6ccf332510316d7b53d;p=services%2Fjenkins-scripts.git Add placehoders for new actions Printed 'Not implemented' messages for 'rebuild' and 'remove' actions. Raised exception for unsupported actions. Change-Id: I1c5955030aa0fa9f8943dab33a41e9b6c3ee6fca --- diff --git a/job_re.py b/job_re.py index 5b34e59..456f86e 100755 --- a/job_re.py +++ b/job_re.py @@ -99,9 +99,16 @@ def main(): submission = os.getenv("submission") comment = os.getenv("comment") if submission and comment: - state = "accepted" if action == "accept" else "declined" - return accept_or_reject(build, submission, state, - target_project, comment) + if action in ("accept", "reject"): + state = "accepted" if action == "accept" else "declined" + return accept_or_reject(build, submission, state, + target_project, comment) + elif action == "rebuild": + print "Not implemented yet" + elif action == "remove": + print "Not implemented yet" + else: + raise LocalError("Unsupported action: '%s'" % action) elif not submission: raise LocalError("Submision is not specified") else: