diff options
author | Steve Block <steveblock@google.com> | 2010-05-26 10:11:43 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-27 11:14:42 +0100 |
commit | e78cbe89e6f337f2f1fe40315be88f742b547151 (patch) | |
tree | d778000b84a04f24bbad50c7fa66244365e960e9 /WebKitTools/QueueStatusServer | |
parent | 7b582e96e4e909ed7dba1e07153d20fbddaec3f7 (diff) | |
download | external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.zip external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.gz external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.bz2 |
Merge WebKit at r60074: Initial merge by git
Change-Id: I18a2dc5439e36c928351ea829d8fb4e39b062fc7
Diffstat (limited to 'WebKitTools/QueueStatusServer')
-rw-r--r-- | WebKitTools/QueueStatusServer/handlers/statusbubble.py | 1 | ||||
-rw-r--r-- | WebKitTools/QueueStatusServer/handlers/updateworkitems.py | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/WebKitTools/QueueStatusServer/handlers/statusbubble.py b/WebKitTools/QueueStatusServer/handlers/statusbubble.py index 0e2b8de..bfbe958 100644 --- a/WebKitTools/QueueStatusServer/handlers/statusbubble.py +++ b/WebKitTools/QueueStatusServer/handlers/statusbubble.py @@ -42,7 +42,6 @@ class StatusBubble(webapp.RequestHandler): _queues_to_display = [ ["style", "style-queue"], ["cr-linux", "chromium-ews"], - ["cr-win", "cr-win-ews"], ["gtk", "gtk-ews"], ["qt", "qt-ews"], ["mac", "mac-ews"], diff --git a/WebKitTools/QueueStatusServer/handlers/updateworkitems.py b/WebKitTools/QueueStatusServer/handlers/updateworkitems.py index b58e743..f91beb4 100644 --- a/WebKitTools/QueueStatusServer/handlers/updateworkitems.py +++ b/WebKitTools/QueueStatusServer/handlers/updateworkitems.py @@ -42,23 +42,32 @@ class UpdateWorkItems(UpdateBase): def _work_items_for_queue(self, queue_name): if queue_name not in queues: - self.response.set_status(500) - return + self.response.out.write("\"%s\" is not in queues %s" % (queue_name, queues)) + return None work_items = WorkItems.all().filter("queue_name =", queue_name).get() if not work_items: work_items = WorkItems() work_items.queue_name = queue_name return work_items + def _parse_work_items_string(self, items_string): + # Our parsing could be much more robust. + item_strings = items_string.split(" ") if items_string else [] + return map(int, item_strings) + def _work_items_from_request(self): queue_name = self.request.get("queue_name") work_items = self._work_items_for_queue(queue_name) + if not work_items: + return None items_string = self.request.get("work_items") - # Our parsing could be much more robust. - work_items.item_ids = map(int, items_string.split(" ")) + work_items.item_ids = self._parse_work_items_string(items_string) work_items.date = datetime.now() return work_items def post(self): work_items = self._work_items_from_request() + if not work_items: + self.response.set_status(500) + return work_items.put() |