| Index: dashboard/dashboard/pinpoint/handlers/new.py
|
| diff --git a/dashboard/dashboard/pinpoint/handlers/new.py b/dashboard/dashboard/pinpoint/handlers/new.py
|
| index 4fd6de554c7249f86874fd034b1bf5034f776e79..449bf6528e30e753ee613d63ffca53a7f548039e 100644
|
| --- a/dashboard/dashboard/pinpoint/handlers/new.py
|
| +++ b/dashboard/dashboard/pinpoint/handlers/new.py
|
| @@ -29,6 +29,7 @@ class New(webapp2.RequestHandler):
|
| @api_auth.Authorize
|
| def _CreateJob(self):
|
| """Start a new Pinpoint job."""
|
| + repeat_count = self.request.get('repeat_count')
|
| auto_explore = self.request.get('auto_explore') == '1'
|
| bug_id = self.request.get('bug_id')
|
|
|
| @@ -48,6 +49,7 @@ class New(webapp2.RequestHandler):
|
|
|
| # Validate arguments and convert them to canonical internal representation.
|
| arguments, quests = quest_generator.GenerateQuests(self.request)
|
| + repeat_count = _ValidateRepeatCount(repeat_count)
|
| bug_id = _ValidateBugId(bug_id)
|
| changes = _ValidateChanges(change_1, change_2)
|
|
|
| @@ -56,6 +58,7 @@ class New(webapp2.RequestHandler):
|
| arguments=arguments,
|
| quests=quests,
|
| auto_explore=auto_explore,
|
| + repeat_count=repeat_count,
|
| bug_id=bug_id)
|
|
|
| # Add changes.
|
| @@ -77,6 +80,16 @@ class New(webapp2.RequestHandler):
|
| }))
|
|
|
|
|
| +def _ValidateRepeatCount(repeat_count):
|
| + if not repeat_count:
|
| + return None
|
| +
|
| + try:
|
| + return int(repeat_count)
|
| + except ValueError:
|
| + raise ValueError('"repeat_count" must be an integer.')
|
| +
|
| +
|
| def _ValidateBugId(bug_id):
|
| if not bug_id:
|
| return None
|
|
|